RequiredFieldValidator client side validations do not work on IE 10 - c#

All my webforms using RequiredFieldValidator, RegularExpressionValidator and ValidationSummary are not working on IE 10. It is working fine on any other browsers. It is strangely doing postback which does not happen on any other browsers.
Another strange thing is when I open developer console(F12), it seems to be working but it is still doing postback. All these Validations should occur at client side by default.
Has anyone here faced similar problem?

please check these link1 and link2
Edit:
I got this fix from.. Hanselman
Browser Definition files shipped with .Net 2.0 and .Net 4.0 contains defintions for certain range of browser versions. By default, ASP.NET uses sniffing technology for the user agent string to detect browsers. The browser definition files cover a certain range of browser versions.As the version numbers increase, ASP.NET might not recognize new versions of a browser by using the user agent string. In this case, ASP.NET might handle these versions as an unknown browser and causes inconvenience.
FIX
The fix is to get updated browser-definition files.
You can install a machine-wide fix or just fix individual projects.
Hotfixes are availble with download links.
- .Net 4
- .Net 2.0

Related

Removing Unused ASPX pages from ASP.NET Forms Project

Clean Up question: I am working on a large ASP.NET FORM 4.0+ project where there are many legacy pages.
Before I start a timely process of elimination. I wanted to reach out to determine any extensions in Visual Studio that can analyze unused or not referenced, or not linked to any web page report anymore.
Another thought is I do have about 6 months of IIS logs I could run web traffic reports remove any page not showing up in the reports.
Share your wisdom please, the project is over 5000 asp.net pages
Primary reasons for cleanup:
- Project will build much faster..
- Allow adding other developers to the project will be sanitized..
I wanted to reach out to determine any extensions in Visual Studio
that can analyze unused or not referenced, or not linked to any web
page report anymore.
After a long research, there is no such vs extension for VS2019 to remove any used aspx pages so far.
But there is an extension called FindUnusedFiles which applies to VS2015 or earlier version. It has not been updated to use in VS2017+. So as a suggestion, you can write a review under Rating & Review in this link. Try to contact with the author to apply it in VS2019.
Besides,I recommend you could post a feature request in our User Voice forum(DC)----suggest a feature to share your idea with the staff to add the function into VS2019.
After you post it, you could share the link in this thread and anyone who is interested in this including us will vote it to get the attention of Microsoft as soon as possible.
Hope it could help you.

Microsoft LocalReport (rdl) in ASP.NET Core MVC App

I am running a project with ASP.NET Core (2.1) MVC. In our company we do have a lot of work done with SQL Report Builder (rdlc and rdl files). Therefore we wanted to use a "one the fly" mechanism to generate PDF Files with the ReportBuilder technology in the asp.net core mvc webapp.
I tried the same nuget packages we are using in .net Framework (asp.net API and desktop app) but they are not working. The packages I tried are:
Microsoft.ReportingServices.ReportViewerControl.Winforms
Microsoft.ReportingServices.ReportViewerControl.Webforms
The problem there is that they are using System.Web which I cannot include in .net Core apps, do I?
I googled for any solution but did not find a lot of helpfull material. I am also ware of that Microsoft purchased a product to get the work done:
https://blogs.msdn.microsoft.com/sqlrsteamblog/2018/04/02/microsoft-acquires-report-rendering-technology-from-forerunner-software/
And I already read this article about a similar problem:
RDLC Local report viewer for ASP.NET Core and Angular(>2.0)
Do we have the wrong technology setup in mind or is this even not support at all. I found some other package (https://www.nuget.org/packages/AlanJuden.MvcReportViewer.NetCore/) which are working with html to render a report. But we really want to use the rdl files
Any informations and suggestions are greatly appreciated.
In the end we came up with a totally other approach.
We just created a new Application called "DocumentService" on .NET Framework running as a Service on a Windows Server. The service was checking a database if there are new jobs in the database queue and if so, it generates the pdf result and stores it in the database.
So the web application was not longer responsible for creating the pdf, it only added a new line in the database so mark that a new document should be created. The DocumentService app then generated the document and the web app could access the data in the database.
We can use this "DocumentService" in other part of our application landscape and therefore the effor was worth it. It app is also multithreaded and working pretty fast and well.
No you can't include System.Web. I had same problem and solved it with AspNetCore.Reporting. You can download this from NuGet. This can be useful: https://www.dotnetcurry.com/aspnet/844/aspnet-ssrs-reports-programmatically-html
Well, depends. If you want it inside your application, and don't mind generating the report in iframe it's possible. Or you can always open it in a new tab. Only problem is that you have to know the link to the report. I did it like that in my company's program. If you want to know more, just ask me, but officially ASP.NET Core doesn't support reporting

Published .aspx only shows plain html

Today i made a quick template for a landingpage and wanted to test it on my webhotel. I have never actually published a website on a webhotel before, but the initial process in asp.net was pretty flawless.
The way i got my webpage onto the server, was by publishing my project and transferring it to my server on a FTP connection.
However, when i open my up my webpage, it only shows the html code, which is really weird. .
http://bkrt.dk/Index.aspx
What may i have done wrong, and How do i solve this issue?
Turns out that my webhotel doesnt support .aspx, but only php!
- Solution is that i either change webhotel, or do a full convertion to html, which seems to be no option. I will therefore look for a webhotel with asp.net support.

asp.net Chart unknown error

I have been some time using asp.net charts, even it was hard to config for asp 3.5 and to make it work, I have been able to move along with all my project but I'm facing something that I have no idea how to solve.
This project works perfectly on my develop enviroment, but when i deployed it on the server, the only page with charts on it appeared like this:
I assume its cause of the charts because its the only thing that really have given me problems and its the only thing that its exclusively on this page but i have no idea how this happens, it only happens on the server with Plesk.
Tried to upload on debug instead of release but the result is the same. Searched overall but never found anything like this.
My Answer may not give you the exact solution. But it may give you an idea's.
Below are my Ideas:
Make Sure you have included all the files into your solution when you do the Build.
Make Sure you have all dependency of Asp.Net Charts in Server.
Check you browser Console and Browser Network. Press F12 in your and check. You can get to know the Exact problem if any issue in loading prob / dependency files.
Double check your server configurations for the charts. And compare your local and server configs.
Do the Deployment in your machine itself and check one round.

Finding more information about browser versions with C#/ASP.Net

First, some background to my problem.
There are many versions of Internet Explorer 6 and 7 that do not support more than 20 Key-Value pairs in a cookie. I have a list of full versions that do and do not support this. This is fixed in a windows update, but it's not possible for me to force the users of my app to carry out windows update in order to use my app.
We have developed a different cookie jar for versions of Internet Explorer that do not support this, however the performance of this is not optimal, and therefore we need to only use this on versions of IE that require it.
The full version number of an IE browser is in the format 6.00.2900.2180. Everywhere I have found suggests using Request.Browser to find out browser information, but this is far too limited for my needs. To clarify this, MajorVersion returns 6, and MinorVersion returns 0, giving me 6.0 (6.0 is the version of pretty much every version of Internet Explorer 6 that exists). So what I need is the third and fourth parts (or at the very least, the third part) of the full version.
So, does anyone know of a way, in ASP.Net with C#, to find out the information I need? If someone has looked extensively into this and found it to impossible, that is fine as an answer.
You may need to revisit why you're storing so many different key-value pairs. Going low-tech, couldn't you concatenate the values into fewer or maybe even a single key? What sort of values are you storing--in a cookie?
Try grabbing the "User-Agent" request header using Request.Headers
Copying this from meandmycode to accept it as answer.
IE doesn't specify the long version
number in the user-agent header so you
have absolute no chance of detecting
this other than sending a 'snoop' page
with javascript to detect the complex
version number.. but doing something
like that is dodge city, and
javascript may not be able to find the
full version either.

Categories