Url Routing for the page inside a folder in asp.net 4.0? -


i trying implement url routing in asp.net 4.0. created small test application. trying browse pages kept inside folder. works fine when running in visual studio..but when hosted application in iis7 showed error.

http error 404.0 - not found resource looking has been removed, had name changed, or temporarily unavailable.

the code used is. (i using master page too.)

protected void application_start(object sender, eventargs e)     {         customroutetable(routetable.routes);     }   void customroutetable(routecollection routes)     {         routes.mappageroute("telugu", "movie/telugu", "~/telugu/telugu.aspx");      } 

in default.aspx page kept button , on click of button wrote.

protected void btntelugu_click(object sender, imageclickeventargs e)         {             response.redirecttoroute("telugu");         } 

where going wrong??? thanks.

have updated web.config support url routing on iis7.

<system.webserver>    <modules runallmanagedmodulesforallrequests="true">        <add name="urlroutingmodule"              type="system.web.routing.urlroutingmodule,                     system.web.routing, version=3.5.0.0,                     culture=neutral,                     publickeytoken=31bf3856ad364e35" />       <!-- ... -->      </modules>     <handlers>        <add name="urlroutinghandler"             precondition="integratedmode"             verb="*" path="urlrouting.axd"             type="system.web.httpforbiddenhandler,                    system.web, version=2.0.0.0, culture=neutral,                    publickeytoken=b03f5f7f11d50a3a" />       <!-- ... -->      </handlers> </system.webserver> 

here artice c/p example from, give more details.

http://msdn.microsoft.com/en-us/magazine/dd347546.aspx


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -