IE 11 broke all our sites - c#

When Microsoft rolled out IE 11 on the automatic updates it broke all our sites.
For example, one of our sites started getting a weird string in the URL. After the '/' the following gets added.
(F(IZOtnSYyVIaxfgEbqezGvIKHeTq8scRxJzvlSVK2airuqpB29zOonBkpv3_Lf61u7hveLZH053qcPgI6cTpejnOWojBJBiePNrC1Z7lShzsKs7VdayYOlA9dF_vIodMiRbUCzDRHbf9UlxsYNbuo_UabOT81))
And because of this nothing on the site works.
Adding the site to Compatibility View in IE 11 works. But what has Microsoft done with IE 11 that destroys everything?
Is there anyway to fix this without having to add the site to Compatibility view?

What you see is a forms authentication ticket, sent in the url, instead of a cookie. ASP.NET thinks that you are using an unknown browser that cannot handle cookies, JavaScript, etc. You should update your browser definition files. A similar issue has actually happened with IE10, not 11: http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx
Or, as a workaround for this one case only, modify your web.config and force forms to use cookies. But it won't solve all your problems.

Try install last windows updates. It helped us this the same situation.

Related

Asp.net authentication redirect creating issue in custom asp.net mvc redirect code

We were using code snippet return Redirect(redirectUrl); to redirect the user to site home page after successful authentication. (redirectUrl is the home page url). The code suddenly stopped working without any change made in the project.
On analysis we found that there was some issue with asp.net authentication redirect and updated the code to suppress the form authentication redirect and the issue got resolved.
Previous code which stopped working:
return Redirect(redirectUrl);
Updated code:
System.Web.HttpContext.Current.Response.SuppressFormsAuthenticationRedirect = true;
return Redirect(redirectUrl);
We need to understand why suddenly asp.net authentication redirect created issue in custom redirect even though there was no code change made in this file.
Can someone let us know what latest changes were made for the ASP.NET framework which might have lead to the issue. We are using asp.net framework 4.7.1 in our project.
Thank you.
ASP.Net websites can also be affected by IIS settings. In this particular case, the fix you found would indicate that Forms Authentication has been enabled in IIS. Typically this results in a change to your web.config file on the web server.
Comparing that file to the web.config file in your project may reveal what has been changed. Other than that, you've not given much detail to help anyone viewing your question to provide a definitive answer.

Kentico custom table data editing issue

Custom table's data hangs on the loading screen after saving any changes. This is happening on some of tables and it seems that the majority of records are saved, however I have noticed a couple that didn't save within some custom table until reapplying the change!
I was wondering what can cause the issue.
I have found the issue using browser's developer tools.
Issue
Clicking save button was creating
Mixed Content: The page at 'https://address' was loaded over HTTPS, but requested an insecure form action 'http://address'. This request has been blocked; the content must be served over HTTPS. JS error on the browser and browser was blocking the content. However, the form action was not pointing to absolute URL address.
Solution
As the server SSL config was fine, therefore, there was not any other way than changing core CustomTableForm.ascx.cs Kentico file. Although it is not recommended. The problem solved by developing RedirectUrlAfterSave property of customTableFormobject to make sure it will redirect correct protocol instead of Absolute URL
Hope it will help you guys.
This was just brought to my attention, not sure how I missed it before. So, I will post my answer just for the future reference :-)
I guess there is some SLL offloading going on before the actual IIS where Kentico is running. In this case, SSL Accelerator must be implemented. The link goes to Xperience 13 version but the same idea applies for older versions. Just use the version selector in the top bar - there could be some API differences.
And the same applies e.g. when uploading media files - the browser console will show mixed content warning. This is for security reasons. Browser sees the HTTPS but behind the offloader there is HTTP communication and the GetAbsoluteURL method takes the protocol from the request. Thus, mixed content. Using the ssl accelerator will tell Kentico to use HTTPS internally.

Deploy WebAPI to external website

We have a public website that is already exposed to the outside, although in reality there's really nothing there. Simply default.htm file with "Coming Soon" text in it. (http://vensuresoftware.com/)
We also have a WebAPI we've put together that we want to add to this website. When I publish locally to my IIS6, it works no problem. It's accessed as http://localhost/HRConnect/api/Claims just fine. I've used PostMan, a C# client, and Javascript AJAX to access this just fine. I can also load it in a browser at that URL, and I get the appropriate default controller and action.
However, I have been totally unable to accomplish this same thing on the website. Ideally I'd like to include it as a Virtual Directory to the http://vensuresoftware.com and access it as http://vensuresoftware.com/HRConnect/api/Claims but I've had zero luck doing so.
I have tried to add it as a Virtual Directory as well as an Application under that specific website, but when I access the URL, all I get is "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
I've ensure the Application pool is correct, with an appropriate user and the pass through connection test succeeds. But I just cannot access the service or the URL.
Any ideas or suggestions at all on what I can try? I'm not sure what else I can include here. Nothing special in IIS, nothing special in the service really. There's only 3 actions in it. As I said, it all works beautifully locally, under localhost though.
IIS 7 doesn't have built-in support for extensionless URLs which causes a lot of headaches trying to get MVC and Web API apps to run. I've gotten it to work using both these options. Pick the one that applies to you.
Install this IIS patch which allows IIS 7 to handle extensionless URLs.
If the patch isn't an option because you're worried about breaking other sites on the server, you can make the Web.config adjustment found in this answer. You'll have to do this for every MVC/Web API app you have running on the server.

Publishing .NET 4.5 ASP.NET website on IIS 7.0 yields an error 404 though the files exist

I am trying to deploy my first ASP.NET application on a server running IIS 7. But I always get an error 404 when trying to open the page. I thought it might be a start page issue, so I entered a direct URL to a .aspx file inside the wwwroot folder, but that got me another 404. Next step was to set a start page in the IIS Manager to a certain .aspx file, which made the page open, but the URL shown didn't include the specific page, and I didn't see my bootstrap navbar (just links that should be inside it) nor my Infragistics components. (To give context, we just upgraded the server to .NET 4.5 this morning, but all other ASP.NET websites in the same or other application pools still work perfectly!).
I then enabled the option to see folder contents in the browser; opening the website then showed me all the files that were supposedly not found, but clicking on them gave me 404 again. For testing purposes I put a .html inside the main folder: that one I could click and open, as well as *.css files or images in subfolders. But as I said above: ASP.NET is installed and working for all the other websites. I checked the MIME things, there is nothing for ASP related files, but neither is there in the working projects. The handler mappings seem to be correct as well.
So what could the reason for this be? I am totally unacquainted with IIS, so I lack any ideas beyond simple googling :/ My guess would be something permission-related (the app pool it's currently in is using pipeline mode: classic; but again, the same as the working stuff) or another dynamic content option I missed. Or - since as soon as I manually define a start page to be one of the .aspx files, I see at least something - it could be related to extensionless URL's? When I manually enter
myservername\myappname\StartPage.aspx
the browser at least shows
myservername\myappname\StartPage
instead. But I can't seem to find an option to change this. Any help is greatly appreciated!
I ran into this issue when I first started working with ASP.NET. I spent hours scratching my head trying to figure out what was the problem. After a fair bit of research this is what solved my problem. I added the flowing code in the web.config file.
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"></modules>
</system.webServer>

IIS 6 gives directory listing unavailable in MVC 2 application

I have inherited an MVC 2 application and we are constantly getting 404 errors and directory listing unavailable errors. I have tried adding in the additional routes suggested by the forums to get around the issues in IIS 6, but we still get the error. The other baffling thing is that the error doesn't happen consistently. We have tried to replicate it while debugging with no success, we have also run load tests on the app and it functions fine under load. I have gone through the code and there is nothing obviously wrong with it, it does use session, and viewdata variables extensively, however the values being stored are small and shouldn't be an issue. Like I say I am at a loss to explain why this is happening. Any ideas are welcome.
IIS 6.0 doesn't support extensionless urls out of the box. Checkout the following blog post for configuring.

Categories

Resources