Asp.net mvc application doesn't start on iis - asp.net

I am new to asp.net mvc. I have created a web application, it seems, successfully deployed it to my iis server. However, when I try to start my webpage by typing the following URL (http://localhost/MyWebApplication) the browser shows me the contents of my application folder instead of starting the page. When I start the application in the debug mode in the VS, everything works perfectly.
Could someone explain, please, how I can fix this problem?

Related

Mulitple application under Default website IIS asp.net

We have got a space in our company server with url tools.mysite.com which is a .net based web application. So its working fine in our domain. But now we have new requirement of setting up a new application under tools.mysite.com which is also a separate web project done in ASP.NET 4.0. Unfortunately I dont have any previous experience of setting up IIS single site with multiple application. But with little googling, I tried creating a applicaiton under Default website (tools.mysite.com) and specified the physical location and alias as downloads.
So obviously as I expected I am getting that path in browser like this and for testing I put a test.txt file there.
tools.mysite.com\downloads\test.txt
which is working fine
But the challenge is when I try
tools.mysite.com\downloads\default.aspx
its triggering an error resource cannot be found. But default.aspx is there which is my home page I have created and its loading fine when I run the application from Visual Studio itself.
So please help me to run my second .NET based application.

web application throwing error in iis

I am using one asp.net application which i hosted as website in iis. After that i added one another web application under of that website. Both are working there i did not find any issue. Later i added one custom http module in website for urlrewrite then checked it is working fine. But now the issue is when i am running web application then it is throwing error.
Please see the screen shot below:
Screen shot for error page
I have fixed this issue by my own. just need to add remove httpmodule name in web application web.config under and it works fine for me.

SignalR Chat application not working with IIS

This is the url from where I've downloaded the SignalR chat application between a web server and a web client.
http://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr
This works fine when debugged on VS2013 but when published and deployed on IIS 7, somehow doesn't work as expected. To be more clear, I'm getting page displayed properly, but the dialog box doesn't popup for entering the username(which it is supposed to behave like) and the page remain static, when the url is hit from a browser.
Is this a configuration issue with SignalR and IIS ? Kindly help in making it work. I'm new to SignalR, and am trying to make a sample SignalR app work in IIS.
Thanks in advance !
Check the Applicatlion pool it should be ASP.Net4.0 (integrated).

Blank page when I run or debug MVC application in local machine

I'm working in MVC 5 application, and all was working well. but after time of edits and updates, I get a blank page when I try to run or debug it in my local machine.
the blank page come if I working under local IIS or IIS Express or VS development server, all return a blank page.
The response header of the request is 503 Service Unavailable
Solved:
I find the app_offline.htm file in the directory of my application which cause this behavior...
just write for who may get this later, I don't know how/when this file come there.
It may be because the application pool that contains your application is in stopped status. Restart the app pool for your application in IIS as in screenshot below.

asp .net 4.0 app on IIS7 Error 404.17

I am having a problem setting up a website under IIS 7. I have created an application and the application pool for the application. Application pool is using .Net Framework 4.0 as my .net app is written in .Net Framework 4.0. Application pool is set to use classic Pipeline Mode. MIME Types have been automatically added to .asp & .aspx.
When I run the website windows explorer is showing me "View Downloads" and trying to download "application name localhost" when it downloads the file I notice that its the html of my default.aspx. I have checked Default Document and it contains Default.aspx.
If I remove .asp & .aspx MIME Types then I get an error: HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler.
I have seen this problem many times. IIS is not serving aspx pages and most likely is not running for the entire server or that site.
For the entire server: Check to see if iis world wide web service is running.
For the site alone: Hit run inside IIS.
You can easily know if IIS is running properly by going to IIS and hit the browse option from inside a web site.
With the data you have put these are the things I would try in order if I were you:
Check in Server Manager/ Features if ASP.NET is installed (ServerManager/Roles/Web Server(IIS) look for ASP.NET
Check IIS Manager if everything is ok by:
Try to browse a test.html file to see if you are able to browse normal
Check Basic settings by clicking Test Settings
Check Handler Mappings to see if aspx is there.
Try to browse a sample test.aspx page with test data.
Check Application pool settings.
Reinstall Framework 4.0
Reboot machine ( a classical)
If you gave us more info and/or the ouput of my proposed tests maybe can help more. Good Luck :)
I had the 404.17 error happening on a server today. As you and cad mentioned, I checked the framework of the Application Pool that my site was using to make sure it was set to ASP.Net 4.0, and it was. What happened in my case is that my site was not using the application pool that I thought it was. My site was nested under another site, meaning my site pointed to a subfolder but another site was pointing to the root folder. Even though I had my site set to use the ASP.Net 4.0 Application Pool, the root site used a different Pool that had ASP.Net turned off, it was set to "No managed code". When I set the framework to 4.0 for the Pool the parent site was using, then my site started working.
In my case the solution was fixing the Handler mappings as explained here: http://forums.iis.net/post/1943489.aspx
IIS Manager->high-light you web site->click Handler Mappings icon on
the home pane->click Revert to Parent...
on the right Actions pane

Resources