.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

UrlAuthorization module does not work expect on IIS7

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :ASP.Net

Hello Guys,

Here are the structure of my web site:

Login.aspx in the root path

UserInfor.aspx and 1.txt in the sub-directory folder named 'Restricted'

Authenticate this website with form authentication configured in IIS, and does not allow anonymous to get into the Restricted folder with the web.config file.

I think it should work this way, if I manually access the 1.txt in the browser, I should be able to view the content, and if I go to the modules configuration for this applicaiton in IIS7, find the 'UrlAuthorization' module, and cancle the listbox for 'invoke for requests to asp.net ...', I should be directed to the loginurl setting in the root web.config file when I access the 1.txt file without logging, however, I still can see the content of 1.txt. Any suggestions?

View Complete Post

More Related Resource Links

Why doesn't FormsAuthentication.RedirectToLoginPage() work in a module?


Within an application I have created the following module, which basically checks for some Session data before allowing access to the page.  However, this never seemed to actually work.  When I did some debugging, I found that ..... does not actually execute within the module, and the exception is always thrown (or whatever other functionality follows the redirect).

Could anyone please explain why this is?  If I change the code to HttpContext.Current.Response.Redirect(...) then it does work okay.

Public Sub Init(ByVal ctx As HttpApplication) Implements System.Web.IHttpModule.Init
	AddHandler ctx.PostAcquireRequestState, AddressOf context_PostAcquireRequestState
End Sub

Private Sub context_PostAcquireRequestState(ByVal sender As Object, ByVal e As EventArgs)
	If HttpContext.Current.Request.RawUrl.ToLower.EndsWith(".aspx") AndAlso Not HttpContext.Current.Request.RawUrl.ToLower.EndsWith("login.aspx") Then
		If (Not MyApp.UserSessions.SessionExists) Then
			Throw New Exception("HOW DID YOU GET HERE?")
		End If
	End If
End Sub

MVC doesn't work once is published in the WEB, "Error 404 Page Not Found" vs2010 iis7 mvc 2rc2 I up


Hi Everyone.

 I'm doing the samething in my two differents pc.

1) Windows 7,  vs2010 rc, mvc 2rc2, .Net 3.5

2) Winodws xp, vs2008, mvc 2rc2, .Net 3.5

My Hosting is in GOdaddy IIS 7, .Net 3.5.

I created a new project in both computers, i build it, i copied the 3 dll's files in the bin folder (System.Web.Mvc,  System.Web.Routing, system.Web.Abstractions), and i publish them...., i go to my website (www.luisbragagnolo) both same problem "Page Not Found"

 I tried many blogs...many advices...nothing yet....

 Any other new Advice people? Thankssssssss

Cannot use a leading .. to exit above the top directory ... with iis7 rewrite module



I'm currently having an issue with asp net mvc and iis7 rewrite module.

I'm rewriting a page from /kw.htm to /Listing/Search.

And when it renders I have an exception that says "Cannot use a leading .. to exit above the top directory"

I thought this scenario was now handle with the iis7 rewrite module.

Did I miss something ?




Code that works in WebDAV does not work when deployed to IIS7



I have been working on a solution that:

1. Connects to a Lotus Domino server to retrieve data from the .nsf file

2. Uses NotesSQL Driver 8.0 (I've tried both System DSN and ConnectionString method)

3. When I view the page using VS 2008 own's WebDAV to test run, it works flawlessly.  Database can be connected and so Data was retrieved successfully. 

However, when I deployed the website to IIS 7, it gives me problem:

Following is the stacktrace from the Event Viewer entry:

Log Name:   Application
Source:    ASP.NET 2.0.50727.0
Date:     02/11/2010 5:04:07 PM
Event ID:   1309
Task Category: Web Event
Level:     Warning
Keywords:   Classic
User:     N/A
Computer:   KITWILLIAM.naim.com
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 02/11/2010 5:04:07 PM
Event time (UTC): 02/11/2010 9:04:07 AM
Event ID: 0ec2d703a5884f92be87faf06f746c00
Event sequence: 4
Event occurrence: 1
Event detail code: 0
Application information:
  Application domain: /LM/W3SVC/1/ROOT/Resrc-4-129331622441589373
  Trust level: Full
  Application Virtual Path: /Resrc
  Application Path: C:\inetpub\wwwroot\Resrc\
  Machine name: KITWILLIAM
Process information:
  Process ID: 2644
  Process name: w3wp.exe
  Account name: NT AUT

RadioButton inside GridView, How to get it work as normal

Did you tried before to drag a RadioButton control inside a Gridivew templatefield, and then you attempt to select these RadioButtons , you will notice that the behavior of RadioButton control will be changed and it will work just like the behavior of checkbox control! the user will be able to select more than one radiobutton in the grid!

Looking for guidance: wanting to work with AJAX architecture



I'm starting a small website that will be backed by a database, and will allow a small number of users to authenticate and select an entry in the database, and then view (and optionally update) a corresponding entry (think master-detail).

I have some flexibility in how I'll do this, but I'd really like to incorperate some newer AJAX style coding, eliminating some page postbacks. I think this is a great opportunity to learn the concepts well.

I'll probably go with an ASP.NET 4.0 site. From what I've seen there are MANY ways to go about this:

-WCF Data Services to expose the data, and consume in ASP.NET

-Page methods to expose the data, separate method to update the data

-I'd rather avoid the UpdatePanel because I'm really looking for a full hands-on approach, with learning client side scripting being an objective as well.

Beyond that, it seems that one can use jQuery to build clientside templates, but also one can use the ASP.NET AJAX template engine (in ASP.NET 4.0 I believe).

A concern I have: users should only be able to work with the data exposed via these endpoints if they are logged into the website. Hopefully I can somehow reuse the ASP.NET forms authentication cookie for this purpose. 

Well, I hope I've posted enough to a

animate effect work but the render items are messed up.


Hi all,

     I have a very unique problem, humm i think. I am using a jquery effect that animate bounce effect, i have a line in my javascript pageLoad function $("#UserBrowserInfoDIV").show('bounce'); - the effects run smoothly but what it does is mess up the bolded text in the div. I have try the items inside the div without bolding and it works fine and no render problem but when bolded the text that are bolded is quite messed up, and barely readable.

Please let me know is there anything else i can do i really would like use this effect.

P.S all the effect have the same render problem, and i am using ie8 under compatibility mode.





Why getTreeNode does not work?



I try to run a  treeview example from msdn:


I also want to use code from


Here is my code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register TagPrefix="mytree"
Assembly="Microsoft.Web.UI.WebControls" %>
 <script type="text/javascript" language="javascript">

     function xxx() {

         var myNode = treeview_one.getTreeNode(treeview_one.selectedNodeIndex);


<form id="myform" runat="server">
<mytree:treeview id="treeview_one"  runat="server" Child

IIS request filtering module


Hi folks,

I have migrated my web application to iis 7.5 Now I am using windows 7 as dev machine.

the problem is it takes several seconds to download a single page into web browser now. It contains only 300 records.

Everything is ok on prod website though. Prod version contains up to 200000 records .I can't also use code profile tool of red gate to analyze possible bottlenecks since the software in question can't restart IIS. No errors in IIS logs. I am using ISAPI Rewrite 3 filter by Helicon to apply some URL rewriting rules. I am thinking about conflict between ISAPI rewriting rules and default IIS 7.5 request filtering rules, since the IIS request filtering module gets a higher priority than even the built-in IIS 7.5 rewriter module. Is it possible to tweak the module through web.config so that priority is given to ISAPI rewriting rules or something like that?

Frankly, I spent several days to figure out solution. No success...

I've also deployed the application on IIS 5.1. Everything works fine. Any ideas about possible solution for IIS 7.5?

Category attribute of user control property does not work correctly in categories tab.



I have a User Control (ascx) and a property which a want to display in my categories tab in Visual Studio in the category named "Styles".

[Category("Styles"), DefaultValue(""), Description("The value for formating something.")]
public String MyFormatProperty
set { /* the code for set */; }
get { /* the code for get */; }

And here is the problem: Actually I do not need a get, because I only have to set the property (write only property). But when I omit the get, the property is displayed in the "Misc" category in the categories tab in Visual Studio. Only when I code the get as well, then the property is displayed correctly in the "Styles" category in the categories tab in Visual Studio.

Does anybody know why? How can I display the category correctly only with set?

Thanks, S.

Team System: Customizing Work Items


Team Foundation Server's work iIem tracking system provides a number of advanced customization options.This article explores custom control support that lets you link to date, enhance the user experience, present data, and more.

Brian A. Randell

MSDN Magazine October 2009

Extreme ASP.NET: Search Engine Optimization with ASP.NET 4.0, Visual Studio 2010 and IIS7


In this article, the author takes a look at SEO practices that the reader can apply when using the latest Microsoft Web technologies.

Scott Allen

MSDN Magazine September 2009

Peer Fun: A Peer-To-Peer Work Processing App With WCF


We demonstrate creating a peer-to-peer processing platform where multiple players function together for a common purpose: getting your work done.

Matt Neely

MSDN Magazine June 2009

Patterns in Practice: The Unit Of Work Pattern And Persistence Ignorance


Jeremy Miller continues his discussion of persistence patterns by reviewing the Unit of Work design pattern and examining the issues around persistence ignorance.

Jeremy Miller

MSDN Magazine June 2009

Test Run: .NET Module Testing with IronPython


This month we demonstrate how easy it is to use IronPython to test .NET-based libraries.

James McCaffrey

MSDN Magazine June 2009

{ End Bracket }: Don't Be Afraid To Throw Away Your Work


With today's processing power at your disposal, Josh Phillips recommends speculative computation-performing operations ahead of time even if you may never need the results.

Josh Phillips

MSDN Magazine October 2008

Team System: Work Items and Undo Support


Add support for work items to the Team Foundation Server version control add-in.

Brian A. Randell

MSDN Magazine September 2007

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend