[RESOLVED] Hosting 4.0 web application

i tried to implement url routing feature in 4.0 and tried to host in my machine in IIS. but i get an error.

HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

The code i used


protected void Application_Start(object sender, EventArgs e)
        {
            CustomRouteTable(RouteTable.Routes);
        }


void CustomRouteTable(RouteCollection routes)
        {


            routes.MapPageRoute("Telugu", "Movie/Telugu", "~/Telugu/Telugu.aspx");


        }


and one in default.aspx page and on click of the button i wrote:

protected void btnTelugu_Click(object sender, ImageClickEventArgs e)
        {
            Response.RedirectToRoute("Telugu");
        }

is it due to the page is kept inside the Folder in my application???

How to handle this scenario???


Thanks...Please guide me...


Are you certain that IIS is set up to host .net 4.0?

Check your IIS setttings. 

How to know whether the IIS is set up to host .net 4.0???

what are the steps?? Could you guide me???

I had made the application pool ->Asp.net4.0

should i select application pool-> Asp.net4.0 classic  ???

If you are using IIS 7 then yes, I always switch to Classic, while developing in VWD2008.

Classic has worked for me. 

 

Let me check into my server settings I will try to post later.

 

 

Under web sites in IIS 6, look at properties then on the ASP.net folder tab, be certain you first have .net 4.0 available.

I don't know of setting in IIS6 App Pool for asp.net level.

 

i could solve the issue with applying the below code in my web.config file...

<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>


but i have two more issue....

1) i am not able to make url setting for Default.aspx page which is start page...i am also getting Default.aspx ( with extension)

2) how to navigate from HTML side??


Not required if you are running .net 3.5 it is backward compatible and will support 2.0

 

Can you help me to find out the ans for above 2 question which i posted ? 

Check out som eof the VIDEOS at this link

http://www.asp.net/web-forms/fundamentals

There are white papers and videos, search for the videos for a faster start.

 

 

hello

  Thanks..I could get the issue resolved for ul and li with the help of ResolveUrl approach.




thoughts on "[RESOLVED] Hosting 4.0 web application "

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>