403 forbidden after publishing asp.net MVC IIS 8.5 - c#

I have been googling for hours and tried numerous solutions but nothing work. Any help is appreciated. I'm using IIS 8.5
I created a plain basic MVC application with no additional code. I published this plain default mvc template application to the server.
When I enter the address in the browser I got this error:
403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied.
Error:
When I browse to it from the server via IIS I got this error:
403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied.
I tried to
WebServer(ISS)->WebServer->Application Development add .NET
Extensibility 3.5 add .NET Extensibility 4.5 add ASP.NET 4.5 add
ISAPI Extensions add ISAPI Filters
register it via command line (aspnet_regiis.exe -i)
check network service permission
toggle app pool credential with a specific account
runAllManagedModulesForAllRequests="true"
... run out of ideas =(

Related

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler

HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
I am new to IIS and ASP.net .
I developed an application in asp.net 4.0 using c#. ( on my laptop)
I Published the website in File System . ( on my laptop)
I installed 'IIS 8 Web Server' on 'windows Server 2012 R2' by using windows add feature option.
I copied the website published folder on Windows Server 2012 R2 from my laptop.
I created an Application pool on IIS.
I added a new website and created its virtual directory.
Added the home.aspx page in the default Documents.
and Now I am getting this error which I am unable to debug . Please help.
It depend on what extension are you requesting for. IIS return 404.3 when either there is no handler could handle the request or the extension is not included in mime type.
1.Please ensure asp.net and extension feature has been installed from turn windows features on or off.
2.If you get 404.3 when you request static file, please remember to register mimetype for it.
https://learn.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap

Access to application was denied You don't have authorisation to view this page. HTTP ERROR 403

I have a shared hosting environment which supports asp.net 4.0 with IIS 7.5.
We had developed application in .net framework 4.5.2 with asp.net mvc 5.0.0.0.
As i had deployed application through ftp and when i had navigated through site url then i was getting message like "Access to site was denied.You don't have authorisation to view this page.HTTP ERROR 403".
I had tried many solutions from stack overflow as follows :
1.
2. had given full permission to root folder (network service)
3. Enable/disable directory browsing history
None of them was working at my end.
Once i may remove all content and put a simple html page then it will work.
Is there anything that i forgot to add or miss?
I had followed "403 - Forbidden: Access is denied. ASP.Net MVC", "IIS 7.5 - 403 Forbidden"
Finally i got a solution for this issue.
As my application was built in ASP.Net MVC 5 and it needs full trust level.
We have a shared hosting where full trust level is not allowed so we had converted our application to MVC 4 and tried to deploy it on same server and it worked.
I also reviewed that Microsoft stopped support for medium trust for upgraded version of ASP.Net MVC.
We eventually knew this issue by reaching at hosting provider as some hosting provider supports MVC 5 application but some can not.

"CommunicationException was unhandled by user code" when deploying web application to IIS

I am new to IIS and Silverlight. I followed this tutorial to create a web application using Visual C#2010 and IIS 7.
The application is working perfectly when in visual studio using IIS express. When I deploy to Local IIS it shows this error:
CommunicationException was unhandled by user code. An error occurred
while trying to make a request to URI
'http://localhost:55826/WebService1.asmx'
This could be due to attempting to access a service in a cross-domain
way without a proper cross-domain policy in place, or a policy that is
unsuitable for SOAP services. You may need to contact the owner of the
service to publish a cross-domain policy file and to ensure it allows
SOAP-related HTTP headers to be sent. This error may also be caused by
using internal types in the web service proxy without using the
InternalsVisibleToAttribute attribute. Please see the inner exception
for more details.
How can I deploy a web app based on MySQL to IIS without encountering this error?
You need to make the service available across domains when deployed. For this, you need to add a crossdomain.xml and a clientaccesspolicy.xml files to your web project. You can find more details here : https://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx

How to run an asp.net application in local IIS

I am kind of new to asp.net.
I have created an application using Visual studio 2013 Web Express and MVC5. When I wanted to run the application, I was pressing the run button from VS and it managed to open it.
Now I switched the server from IIS Express to Local IIS. When I run the application in the browser, it gives me
Server Error in '/' Application. <br>
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446
I guess because I don't have like Default.aspx file or something, I don't know what is the problem ??
This is a permissions issue. When you develop and run an application inside visual studio it has all the rights it needs. So you need to configure iis when wanting to demo/use the site directly from the webserver. After you have made the application inside IIS -> select the application and in the Actions pane you should see the link 'Edit Permissions'. Clicking that brings up the properties tab and under security add your account or an administrator account and elevate the rights until the site works.
I managed to get it working.
The problem was, I am using windows authentication to access the web application (VS asked me when the project first created). Now I didn't know I need to set it in the iis too.
All I did is enabling the Windows Authentication in iis > MySite > Authentication.

HTTP Error 500.19 , website with framework 3.5 on windows 7

i publish my website and install iis on windows 7, and add my website into this address :
c --> inetpub --> wwwroot
and add permission to my folder (IIS_IUSRS , IUSR) but now when type this address (http://localhost/publish/default.aspx)(Publish folder is in wwwroot folder) in address bar of browser see this error :
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
plz help me!!
First a bit of googling may help you a lot (i heve seen this answer on Google before), second, this error is more likely because you don't have ASP.NET enabled in IIS, to enable open the Control Panel, go to Programs and Features, then go to Internet Information Services-> World Wide Web Services-> Application Development Features and enable ASP.NET, then click Ok and wait for the features to be enabled, also be sure you have installed the .NET Framework.

Categories

Resources