My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 38: ServerPortal : invalid child warning in Visual Studio about web.config and urlrewritings config disapear
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  andrewarnott
Closed:  Feb 2008
Type-Defect
Priority-Medium
Release-0.2


Sign in to add a comment
 
Reported by e...@interpc.fr, Feb 15, 2008
What steps will reproduce the problem?
1. open IIS 7 manager
2. add isapi filter on the server
3. try to open the bob user url

What is the expected output? What do you see instead?
NullReference Exception is raised

What version of the product are you using? On what operating system?
trunk, Vista Pro

Please provide any additional information below.
Null exception occurs because url and rewrite parameters in web.config are 
set to empty when IIS manager modify the file. This is due to the fact 
that urlrewrites section should be placed somewhere else than in a 
builitin section group.
In other hand, it would be more safe that the URLRewriter script verify 
that values are not empty before processing rewriting job.


 
Comment 1 by e...@interpc.fr, Feb 15, 2008
Change propose :

1 - Put the urlrewrite section outside system.web
2 - Update configSection section regarding to this change
3 - In the Process method of URLRewriter.cs, update the path string of the 
GetSection call regarding to this change
4 - Make changes in the GetSubstitution method to prevent null reference exception

I also suggest to change the behavior of the Process method witch actually always 
call the RewritePath methods even when rewrinting is ot needed. The could be done by 
returning null in GetSubstitution whereas returning the unmodified path and call 
rewritepath method in Process only if the value is not null.



Web.config
5.6 KB   Download
URLRewriter.cs
2.4 KB   Download
Comment 2 by andrewarnott, Feb 20, 2008
(No comment was entered for this change.)
Status: Accepted
Labels: Release-0.2
Comment 3 by andrewarnott, Feb 20, 2008
(No comment was entered for this change.)
Owner: andrewarnott
Comment 4 by andrewarnott, Feb 20, 2008
Checked into trunk r172.
Thanks for your suggested changes!
Status: Fixed
Sign in to add a comment

Hosted by Google Code