I have been struggling for days now with this and do not understand neither can i find the cause of my problem. I have a ASP MVC web app with a Class library and the default web project, i am using Entity Framework.
I am getting this Azure blue default screen when publishing my app:
while when creating a new web app, also using entity framework i don't have this issue and the web app launches correctly to the Index page.
I do not understand what is happening and how i can fix this ...
I tried importing the profile from azure and also creating it from VS but same results ...
Any suggestion is welcome, thank you in advance!
Kind regards
So i started comparing the new web app that did work and my app which didn't and turns out these little sections in the Web.config where causing the issue:
<system.webServer>
<!--<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
-->
</handlers>-->
</system.webServer>
Don't know how they got there but comment those and it works ...
Case closed!
Related
I have used mvc 5 captcha in my sitecore 8.1 based web application.But after hardening the captcha was not visible.Does any one face this kind of issues.Please help.
If the captcha Image is not displaying on the WFFM form. I imagine the configuration settings required for the Captcha are no longer present after your actions.
You need to ensure the following settings are present in are in the web.config under the node configuration/system.webServer/handers if you're using iis7 or above
<add name="CaptchaImage" verb="*" path="CaptchaImage.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />
<add name="CaptchaAudio" verb="*" path="CaptchaAudio.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />
See this link for more information or how to complete it in IIs 6
I have been trying many different things to get my MVC 5 application to work on Windows Server 2008 R2 IIS 7.5, but no matter what I do, the website loads with no errors and just loads a blank, white page.
The server has the latest version of .NET installed,
I've added all the assemblies to the 'bin' folder, I added the dependencies in the Web.Config file, tried using various settings on the IIS application pool, and I even added my MVC application as its own site on IIS.
When I create a test MVC 4 application and publish it, the website works out of the box. It seems like anything that uses .NET 4.0 and below works fine, but any version above that doesn't.
I feel like I've read every single Stack Overflow post, every article on the web and every Microsoft post regarding this issue while getting no results.
**** UPDATE ****
I found out that when I type a URL based on the MVC URL/routing conventions (ex. /Home/About) on the MVC 5 app, it gives me an HTTP 404 error, but when I use the same URL on the MVC 4 app, it goes to the correct page.
I had a similar issue and I ended up doing something similar to OP (I suspect he's solved the issue by now). I created a test app and that worked out of the box with IIS 7.5 without special handlers or anything. This is in Server 2008 R2 IIS 7.5 with everything installed (ASP.NET etc). The app pool is set to integrated and .NET 4.0. I did not need to add special handlers. Once I had a known good application, I went through the web.config of the bad and good ones, and copied code from the good to the bad one.
I believe but am not sure this was the right section. It was present in the bad config but not in the good config.
<handlers>
<remove name="MvcResourceHandler" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
</handlers>
I am deploying a web service on AZURE. In AZURE, i have a MYSQL db and i have fed its connection string to the web.config file. Its all working fine in the local environment. But when i deploy it to AZURE, controller don't work. Here are the screenshots of local and remote working scenarios. Also i have traced the remote log file of that request in the screenshot.
Here is the log file of this error (500)
While surfing through the internet, i came across a lot of solutions like using identity, to change authorization to none and so on. I am very confused right now as its been 2 days and i am still stuck in it. Right guidance will be highly appreciated.
I have found a solution to this problem. The problem was simple. As i added the reference of mysql.data.dll in the project, i forgot to add it inside my bin folder (by checking copylocal=true).
After that i updated the web.config file by adding these markups in the <system.web></system.web>Tags.
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.8.3, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
I also enabled custom errors="off", in this way i was able to get production level errors on the deployed code. `
I am trying to deploy a MVC 4 application to IIS 8 on Windows Server 2012.
I am copying the files to the server by using Publish > File System.
I have created a new web site in IIS on the server, pointed this to the correct directory, but when trying to view the site I see 'This page can’t be displayed'.
I have never deployed an MVC application before, so may have missed something very simple.
After spending a lot of time searching on the Web, I have:
Ensured the correct version of .NET (4.0) is installed, and is selected within a new Application Pool created specifically for my app
Disabled Directory Browsing
Ensured the System.Web.MVC.dll is copied into the Bin folder
Added the following to web.config:
Below:
<modules>
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler" />
</modules>
I am very grateful for any help or suggestions!
Martin
Oh dear...it looks like the problem was caused by my using Port 110 in the web site bindings. I think this is a reserved Port.
Hope some of the bullets above help someone else anyway.
I'm trying to use PUT in an MVC 4 application and I'm getting a 405 error.
In my routing I have a constraint on the route to allow PUT and POST, POST to the endpoint works, PUT fails with a 405.
I've followed the advice here ASP.NET Web API returns 404 for PUT only on some servers and here ASP.NET MVC got 405 error on HTTP DELETE request?
I've also deleted WeDAV from IIS, but I'm still getting the 405. Anybody have any other suggestions?
I'm also having exactly the same issue on IIS 8 (with Visual Studio 2012), for that I've followed this advice ASP.NET Web API - PUT & DELETE Verbs Not Allowed - IIS 8 and still no luck
My hosting provider could NOT uninstall WebDAV as this would affect everyone.
This, runAllManagedModulesForAllRequests="true" , worked but was not recommended.
Many fixes included removing the module for WebDAVModule but that still didn't work. I removed the handler also, and finally I could use all verbs POST GET PUT DELETE.
Remove WebDAVModule and WebDAV in modules and handlers.
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
As I said above I'm using the WebAPI and it appears that the WebAPI is 'fussy' over which verbs map to which methods. I ended up having to add the [HttpXXX] attributes (HttpPut, Get, Delete and Post) to the appropriate methods to get the routing to work as I expected it to.
Putting my 2 cents in... Clicking on my site under iis showed 'WebDAV Authoring Rules' as the last entry under 'IIS'. Double-clicking on that showed 'The WebDAV feature has been disabled.' alert on the right and there was a link for 'Enable WebDAV' but it still didn't work. I followed Stanomatic's suggestion above, the handlers section didn't matter, and my modules looked like this:
<modules runAllManagedModulesForAllRequests="true" />
I just added the remove in it and that fixed my problem:
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
</modules>