IIS sudden stop loading images, css, js and other files - iis

I was working on web app to get IP and username and for test I use this code in the visual studio in a web app's web.config file,
<system.web>
...
<authentication mode="Windows"/>
<identity impersonate="true"/>
...
</system.web>
and then IIS stopped to show images, css and js files even I've remove and again add IIS to the system. All published sites even IIS default site didn't show its image, see image1.
image1
The said configured app and other apps work on web server even IIS Express of Visual Studio but not work on Localhost.
The browser in the status bar shows Waiting for static.antp.co...

The reason for this problem is you added windows authentication in web.config file. On local machine, your windows credentials are automatically passed so it can work as expected. But if you run the application on IIS on localhost, you are treated as an anonymous user.
To solve this problem, you can remove the line <authentication mode="Windows"/> if you do not need windows authentication. Or add a web.config in the directory(s) containing CSS, images, scripts, etc. which specifies authorization rules.

Related

My iis automatically points my solution directory though it's published

I have published my IIS application to C:/inetpub/wwwroot/appDirectory and it's have different configuration in web.config file.
and in development version solution directory i have another web.config file and When i build solution my IIS start pointing to solution directory.
that's too annoying, every time i need to remove application from iis and again make application on IIS itself.
Go to properties of your web service in Visual Studio.
Navigate to Web tab
Either Change the local IIS to express or you can give a different application name so it wont replace your deployed application.

Scripts and css not loaded in intranet app

I have an MVC5 intranet app with windows authentication. Mine is a home computer not on the network/domain. I run the app from VS2013. When I log in to the app as current Logged In user, everything works fine.
I have created few other administrator accounts on my machine. When i log in to the app with one of them (for testing purposes), the scripts and css does not load.
I tried setting allow users="*" under authorization. But it doesn't work.
Any idea on this?
There were errors in the actions i had used and hence not loaded properly. Changed them to HTMLActionLinks and it worked perfect for all scenarios virtual directories and website.

Problems Deploying web application to iis

Built a web application with webmatrix, try to deploy locally to iis 5.1 for testing purposes so i added it to my wwwroot folder didnt work then i created a virtual directory. the home page works with this but my login created with web helper doesnt work...when i click login all i see is the browser sending login? and nothing happens....and my web deploy that i installed doesnt work either so i can deploy the site with dependencies to iis... also can it be deployed to windows server2003....any hints would be appreciated...
.
I am using Webmatrix3 and my web server is Windows Server 2008 R2 with IIS7. I just copy and paste my entire project directory from my local machine up to the IIS inetpub/wwroot directory. Then from within IIS7 I right click that directory (which is now in the tree under sites) and select "Convert to Application". Works every time.
I also had to add this to my Web.config to make it work in I.E. because of the forced compatibility mode issue:
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=edge" />
</customHeaders>
</httpProtocol>
</system.webServer>
I hope this helps!

Unity3D Web Client loading Page error in Windows Server?

I have developed an Unity3d 3D Walk through and published it on the Web. When i uploaded to the Linux server, it works fine; However, when i uploaded to a windows server, I have problems.
Linux Server:
http://www.mandanemedia.com/Staging/Unity3D/NUS3DWalkThrough/
Windows Server:
http://skqs.nus.edu.sg/medicallibrary3d/
I think what's happening is that the Unity3D page is not accessible. To try it out yourself, go to this link, and you don't get an error. However, if you go to this page, you will get an ISS error.
I've searched on Google to try and find a solution:
On the IIS Server, it must specify that a Unity3D file is something that is allowed to be sent over.
How to do it:
In web.config file on the home directory of IIS we need to configure the file to allow unity3d file to be loaded:
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".unity3d" />
<mimeMap fileExtension=".unity3d" mimeType="application/vnd.unity" />
</staticContent>
</system.webServer>
</configuration>
Further Links:
http://forum.unity3d.com/threads/14819-lots-of-customers-experience-invalid-Unity-file/page3
Deploy Unity3D in Windows Azure
http://developer.dynamicweb-cms.com/forum/development/adding-mime-types.aspx
And I've got the network admin of NUS to do this, below are screenshots of the server settings:
alt text http://www.mandanemedia.com/Staging/Unity3D/NUS3DWalkThrough/image001.png
alt text http://www.mandanemedia.com/Staging/Unity3D/NUS3DWalkThrough/image002.png
But the issue still exists. I would appreciate if anyone had any ideas on how to solve it. Thanks!
The issue was that the server is windows 2003 and IIS6, as a result this method does not work in IIS6.
Through configure IIS6 we need to use IIS Manager User Interface in windows Server 2003:
Go to Start\Administrative Tools and run IIS Manager.
Right click on the server name and select Properties.
In the Properties dialog box, click MIME Types.
In the MIME Types dialog box, click New. I
the MIME Types dialog box, enter the following MIME type:
Extension: .unity3d
MIME type: application/vnd.unity
It's done, Good luck
I am also not an expert on IIS, but I remember there are some settings that dictate what file extensions IIS will serve to clients. Since the unity web project uses a special file extension ".unity" it seems like IIS has not been configured correctly.
See:
Unity3d Forum post on topic
This gets even more bizarre in IIS 7.5. If I use the web.config method which I have been, it works just fine. Since I manage the server, I decided I wanted to add it to the list of MIME types at the server level. So at the server level I add:
extension: .unity3d
mime type: application/vnd.unity
All of the sudden ALL of my PNG images on multiple sites start returning 500 errors. I remove the mapping at it works.
If I add the MIME Type at the "site" level instead of the server level in IIS configuration it works fine. It appears to be an IIS bug. Just an FYI if you run into it.

Classic ASP on IIS7: refusing to send errors to browser on 500 Internal Server Error

I have classic ASP running on IIS 7.
Even though I configured the ASP "Debugging Properties" to "Send Errors to Browser = True", the web app REFUSES to send errors to the browser and continues to send a 500 internal server error.
My browser has "Show Friendly HTTP Error Messages" unchecked.
Failed Request Tracing is installed (not sure if that's related)
Happens both on web pages loaded locally on the server and remotely
The App Pool is integrated (not sure if that matters)
Any ideas?
Try :
Internet Information Services (IIS) Manager —> Default Web Site —> Click Error Pages properties and select Detail errors
I was having the same issue with a Classic ASP app running in a subfolder of a site. I had enabled detailed errors and the 500 was still showing. My resolution was to enable parent paths in the ASP section in IIS for the site as the application was referencing the parent folder using "../":
I had this occuring on a Classic ASP application running in a subfolder of a site. The solution was:
IIS > Click into your Site > Click into your Application folder > Error Pages > Edit Feature Settings > set to: Detailed Errors
IIS Manager >> double click the ASP icon to open the ASP page. Expand the Debugging Properties node and set Send Errors To Browser to True.
Refer : http://www.chestysoft.com/asp-error-messages.asp
If your website is configured to connect to the physical path of the website as a specific user, instaed of using pass-through authentication, you may get this error if there is a permissions error with this user. It may also be necessary to restart the Windows Process Activation Service and then restart IIS.
If you are hosting the project in a shared environment then you can use the following snippet to view the errors.
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
<system.web>
<customErrors mode="Off" />
<compilation debug="true" />
</system.web>
Refer this URL for complete information http://blogs.iis.net/rickbarber/working-past-500-internal-server-error
Hope it helps someone
I had a 500 error with an ASP Classic application I had just installed on a new server (Windows 2019). Every URL on the application returned 500, no matter what. But no errors were being shown in the Windows event log, and despite configuring detailed errors, as mentioned in several the other answers here, no specific error was being displayed in the browser.
The only clue was in the IIS logs, which showed the HTTP status code as 500, and the IIS substatus code as 19. So a 500.19 error.
That led me to
and the specific issue I was having was answered by the second part of this section:
https://learn.microsoft.com/en-us/troubleshoot/iis/http-error-500-19-webpage#hresult-code-0x80070005
which says:
Don't configure the website to use UNC pass-through authentication to
access the remote UNC share. Instead, specify a user account that has
the appropriate permissions to access the remote UNC share.
and (this is the part I needed to do):
Grant the Read permission to the IIS_IUSRS group for the
ApplicationHost.config or Web.config file. To do it, follow these
steps:
In Windows Explorer, locate the folder that contains the
ApplicationHost.config file that is associated with the website, or
locate the virtual directories or the application directories that
contain the Web.config file that is associated with the website.
Note
The Web.config file may not be in the virtual directories or the
application directories in IIS. Even in this situation, you have to
follow these steps.
Right-click the folder that contains the ApplicationHost.config file,
or right-click the virtual or application directories that may contain
the Web.config file.
Select Properties.
Select the Security tab, and then Select Edit.
Select Add.
In the Enter the object names to select box, type
\IIS_IUSRS, select Check Names, and then select OK.
Note
is a placeholder for the computer name.
Select the Read check box, and then select OK.
In the Properties dialog box for the folder, select OK.
Note
Make sure that the folder properties are inherited by the
ApplicationHost.config and Web.config files so that IIS_IUSRS has the
Read permission for those files.

Resources