IIS - "The system cannot find the file specified." - asp.net

I am building an asp.net web application which has been working on local and staging. however, when i deployed to live, there is a little weird issue occurred. below is the live environment details.
live environment:
Server 2003
IIS 6
when the request url is below, if page not found, it will redirect to page 404 configured in the IIS.
"http://www.xxxx.com/folder1/default.aspx"
however, when the request url is below (with a dot in the folder), it will show a IIS default 404 message which is "The system cannot find the file specified." which isn't what i configured in the IIS and it seems like it skips all the http handlers and modules. Therefore, my custom http handler stop working with this kind of url.
"http://www.xxxx.com/folder.1/default.aspx"
My guess it something to do with the IIS setting. i have have several research, there is no other issue like me.
appreciated if anyone can help. Thanks a lot.
Dion

One of the possible reason could be tool such as UrlScan - you need to explicitly configured it to allow dot(.)s in the url - this can be done by editing <Windows Folder>\system32\inetsrv\urlscan.ini and setting AllowDotInPath=1

Related

Blank ASP.NET Webpage for the application deployed on IIS

I have an asp.net application deployed on IIS Server located at 10.0.0.74, when
i tried to access it with chrome browser i get an empty or blank webpage.
However if my colleague tries to access it from his computer he get normal webpage with content on it.
It seems really weird to me what might be the problem.
The screen shot below is what the page looks like.
I would appreciate any help
This is not enough to go on, assuming ASP MVC 5 on IIS here are some suggestions.
On your server
Check the following
Is the physical path in IIS correct - actually point to your code?
Do you have any rewrite rules in your web.config that could be redirecting?
Did you set up the bindings correctly?
Are you hitting the site under https / http?
Checked "Turn windows features on/off" and see if ASP.NET 4.8 installed
Did you setup the HTTP Redirection and HTTP Errors
See how you are setting up error handling setup in your global.asax, see here and disable it
Goto your Control panel > Programs and features > Turn Windows features on or off and under "World Wide Web Services" / components:
Common HTTP features:
Default document
Directory browsing
HTTP Errors
HTTP Redirection
Static Content
Security
Basic authentication
Request filtering
URL Authorization
Windows authentication
The problem was that the plugins in "Content" folder were not included in the projects.
I included all the files shown in the image below.
I apologize for wasting your time, i should have checked the console before!

How do I find where a redirect is occurring on my website

We're moving an instance of a third party, .NET-based website to a Win2016 server, IIS 8, from an external hosting service. Under the site, there's a WCF web service in a subfolder. There are no virtual directories or apps.
mysite.../Order/v4/service.svc
When I browse to pull the wsdl (https://MySite.../Order/v4/Service.svc?wsdl ), it is redirecting to Login.aspx (https://MySite.../Order/v4/Login.aspx).
Browsing to https://MySite/Order/v4/Service.svc?wsdl redirects to https://MySite/Order/v4/Login.aspx .
IIS has no default document set / web.config's defaultDocument is commented out.
Vendor indicates
That would be a redirect that was setup either on IIS or another
appliance that is doing that.
Same behavior occurs running on the server itself (localhost) and sys eng confirms it shouldn't be leaving the network to hit any firewall.
There are no other .config files on the server with any reference to "Login.aspx".
This still feels like it is some piece of configuration but even doing things I shouldn't need to do like restarting the server just to make sure no caching of settings is hanging around isn't affecting it.
Any guesses on what might be attempting to redirect?
Following Rich-Lang's suggestion in comments provided the information to identify that the global.asax file was handling an error in the web.config. Since the code in this case was in codebehind in a dll, and the vendor indicated their code does not redirect, I had not seen that culprit before. Removing the global.asax and turning off customErrors allowed me to see the underlying issue.

IIS7 Website Configuration [Server Error 500.19]

I created a Windows Server 2008 virtual box with IIS7. I have two websites configured, one is my actual development site and the second is a test site to help troubleshoot this issue.
Website 1 (WS1) - the root of this website is on a drive which is mapped to my development machine (Mac Book Pro). The mapping seems to be working and I can access all files fine (W:\www\dev.frogquest.com).
Website 2 (WS2) - is a very simple website with one ColdFusion page just to prove that everything works. It's root is a local directory on the C:\ drive of the VB (C:\sites\localtestsite.com).
I've added host file entries for both sites (127.0.0.1 ...)
WS1 - Throws a Server error when I try to access it...
HTTP Error 500.19 - Internal Server error
The requested page cannot be accessed because the related configuration data for the page is invalid
Here's what I've tried so far...
Uninstalled both .NET 4.5 and URL Rewrite 2, rebooted, reinstalled .NET 4.5, rebooted, reinstalled URL Rewrite 2 Module… retried… FAIL! I took these actions because of information I found here...
HTTP Error 500.19 on IIS7 "Malformed XML" in web.config
Per the same article as above, I tried deleting the web.config file. Strangely, this had no impact, even after restarting the website, restarting the virtual box instance, etc... which I've done frequently btw just to rule that out.
I tried adding IIS_IUSRS to the WS1 directory, but because it's a mapped drive I didn't get a "Security" tab. So, this was fruitless. This was per this article...
IIS 7.0 Error - 500.19 Internal Server Error
I tried playing with the AppPool security, changing it from "pass-through authentication" to connecting as the administrator of the machine. When I clicked "Test Settings" I did get different results, but they didn't have any material affect in the actual server response. I have screenshots of the test setting results.
I copied the contents of WS1 into WS2 and this works! So, it has something to do with the fact that it's a mapped drive and very likely a permissioning issue in my opinion.
I am now out of ideas and in need of competent help and fresh ways of thinking about this!
UPDATE: Adding a screenshot of the actual error for more info...
IIS does not support any type of mapped drive,
https://support.microsoft.com/en-us/kb/257174
You will have to use the recommended workarounds, such as UNC paths.

Http 403 on new IIS deployment

Having just asked this question : ASP.NET Web Project deployed to IIS Express not accessible outside localhost I figured I would just go ahead and install IIS. I did this - and setup a new deployment of my site.
However when you try visiting it : http://andyworker.hopto.org:8080/ you will notice a http 403 error. Googling around I see this post http://sanuja.com/blog/resolving-iis-403-forbidden-access-is-denied which suggests adding a user and giving it read write execute for IIS however that bit where I add the user fails - as I don't think the user exists?
Can anybody help me here? I am very new to IIS having never deployed something before and having just installed it - but something simple here feels quite unintuitive.
Andy

Move from Dev Server to Prod Server - The incoming request does not match any route

I have developed an app on a dev machine using ASP.Net MVC and all is fine and it works. I have moved it to the Prod Server and when I type http://mydomain.com I get the error:
The incoming request does not match any route
If I then make a request to http://mydomain.com/pagename I then get a IIS 7 404 page.
It is hosted in a Full Trust Mode and Integrated Pipeline according to Softsys hosting who its hosted with.
I am currently accessing the site via a temporary DNS name eg/http://mydomain.com.serv7.temphostspace.com and my host believes this might be it.
From the support ticket this is what they say *"I believe, this is caused since you are access your website through temporary URL http://mdomain.com.serv7.temphostspace.com/ and relevant setting might be missing in your configuration."
Any ideas?
Thanks
Your host is probably barking up the wrong tree, unless the site isn't configured. I'd try and request a static file you know is there to be certain. As for the problem at hand, how are you wiring up the routes? Could something in production be failing before this and prevent this from happening?
Anyhow, first place I would start is by using the ASP.NET Routing Debugger to see what routes your app thinks it has.
Similar problem: ASP.NET MVC running IIS7 deployment problem
Resolution from there: http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx
Turns out it was trust issues not configured right

Resources