开发者

ELMAH File Not Accessible on Local Machine using Host Name

开发者 https://www.devze.com 2023-04-01 07:18 出处:网络
I can access the e开发者_C百科lmah.axd file, to view errors, when browsing using the localhost host name (i.e. http://localhost:24425/admin/elmah.axd).

I can access the e开发者_C百科lmah.axd file, to view errors, when browsing using the localhost host name (i.e. http://localhost:24425/admin/elmah.axd).

I created a different host name and added it in my host file (to mirror production domain name). When I browse the site, and force an exception, the exception does get logged (SQL Server) using the prod host name. However, I am not able to view the elmah.axd file (i.e. http://www.foo.com/admin/elmah.axd). I get "HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

When I force an exception, using the localhost url, the exception still does get logged in SQL and I am able to browse this file: http://localhost:24425/admin/elmah.axd. However, I only see exceptions that occur under the localhost url (not the www.foo.com url).

After reviewing SQL, I see errors that happen using localhost with Application "/" and User set to the account I am logged in with. The errors generated when using www.foo.com have Application set to "/LM/W3SVC/6/ROOT" and the User column is blank.

I just need to be able to access the elmah.axd file when using www.foo.com/admin/elmah.axd. I have set security allowRemoteAccess to "1" in my web.config and have also added the elmah stuff to system.web and system.webServer nodes in my web.config.

I am using Windows Server 2008R2, IIS7.5 and it is a ASP.NET site (set up as a Web Application).

Thanks for any advice given.


By default elmah.axd can only be viewed on the local machine (whicj is why using localhost works).

You need to configure the web application to allow remote access.

0

精彩评论

暂无评论...
验证码 换一张
取 消