I am doing URL to image conversion using HiQPDF. The conversion works on localhost. It also works on AWS when the hosted application is opened from browser. It doesn't work on other environments like my personal computer and another machine where I am logging in using VPN, on any browser. ConvertURLToImage(url) throws this error -
"Navigation error. The remote server closed the connection before the entire reply was received and processed."
I don't think it has got to do with any IIS settings otherwise it wouldn't have worked on AWS.
I have added the following in Web.Config for access to my URL -
<location path="export/execReportDashlets">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
I just ran into the same "Navigation error..." message while trying to generate a PDF. We are using version 8.10 of the HiQPdf software, which is working fine for some connections and has started failing for others. After digging into the issue I believe our problems are related to SSL/TLS connections. On our newer servers we don't allow anything below TLS 1.1, if we relax those rules the connections are successful. I upgraded HiQPdf to version 10.17 and ran some tests. Connections using the updated component are working fine with our newer server configuration. There doesn't appear to be any mention of updates having to do with secure connections on their site though and both versions are using the same runtime version. I have a support request in with them to confirm, but I think upgrading will fix the issue for us.
Maybe relevant, maybe not, depends on the request.
Update:
HiQPdf support got back to me with the following:
The latest version should work with TLS 1.1 and 1.2. You can try the latest version in demo mode if you don’t set a serial number.
Related
I migrate an dotnet framework web api application from vs 2010 to 2019.
I want to use IIS express for developpement mode debug.
My application is built with a api back in dotnet framework 4.5 using xml and not json and a front in dotnet winform.
sorry for the french messages.
thanks a lot for your suggest.
I've been stuck with this for a week
Vincent
I tried to change the web.config, the applicationhost.config (in the user iis express directory and the .VS\config directory.
add modules to IIS manager
Try removing this line from your web.config,
<identity impersonate="true"/>
Or,
as Described in here;
Your application's Web.config file specifies "identity
impersonate='true'".
In IIS 7 Integrated mode, client impersonation is not available in
some early request processing stages. Therefore, IIS will generate the
migration error message. If your ASP.NET Web application impersonates
client credentials (most common with intranet scenarios), you may want
to set the validateIntegratedModeConfiguration attribute to false.
Add this section to your config to overcome this issue,
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
thanks for your help
I have tried
validateIntegratedModeConfiguration="false"
and it worked only when I deleted the lines created in the applicationhost.config (but it's not a solution)
we finally found: the problem was that I modified the .csproj file; but the file used for the user configuration is the .csproj.user.
It is modified with the "property" tab of VS.
I had seen it in a post for an mvc web application, since we are using an api, I thought it was different because it is an api.....
My colleague showed me the options in the panel... and now it works!!!!
[]You have to modify in properties :
anonymous authentication : disable
windows authentication : enable
pipiline mode : classic
and that's all
Make sure all the following .NET modules are installed.
.NET SDK 6.0.100
.NET Runtime 6.0.0
.NET hosting 6.0.0
note that the above are the current versions the versions may differ.
also change the version of .config files by running as Administrator whether you open the .json on Notepad or your IDE.
make sure your Internet Information Services is up to date and have selected all features on IIS
We have an application which is developed using MVC3 and .Net framework 4.0. To prevent HTTP Verb Tampering, we have included below code in application's web.config file. In local machine given fix was working as expected and returns 401 unauthorized code.
<authorization>
<allow verbs="GET" users="*" />
<allow verbs="POST" users="*" />
<deny verbs="*" />
</authorization>
When we deployed the same code, test result returns 202 OK. So the fix is not working. Is there any way around that we can fix this issue?
Are you are working with the "Play" button on Visual Studio? Is this using a IIS Express or are you really "deploying" that to an IIS WebAPP on your local machine?
I usually do not use the "Play" button when I am developing for IIS, specially when I am developing for a specif IIS Server. When that happens, I try to have the same IIS Server configuration on my machine and create a WebApp pointing to my Dev folder to test it.
If you are having trouble to config your web.config, I would use the IIS visual tools, check the modifications made on the web.config and commit that.
Please note that there are some differences in the configuration in the ASP.NET side and on the IIS side:
Please check this website:
https://learn.microsoft.com/en-us/iis/manage/configuring-security/understanding-iis-url-authorization
And refer to these notes:
Differences Between ASP.NET URL Authorization and IIS URL Authorization
There are small but important differences between ASP.NET UrlAuthorization and IIS URL Authorization.
ASP.NET Url Authorization is installed when you install ASP.NET on top of IIS.
This refers to IIS 7.0
Even though several configurations are compatible between one IIS to another, some specific changes might apply.
I've created a WebApi with .Net.
On localhost (Visual Studio) all works well.
Also, when I publish it on a IIS 7 on a Windows Server 2008, it works well too.
Now I want to secure some methods.
I've created as
public class BasicAuthHttpModule : IHttpModule
and in the web.config I configured this as
<system.webServer>
<modules>
<add name="BasicAuthHttpModule" type="WebHostBasicAuth.Modules.BasicAuthHttpModule"/>
</modules>
</system.webServer>
The mehod I want to secure has [Authorize] above it.
On my localhost (debug in Visual Studio) it works well again.
With Postman I see that I can access the method with the specified username/password.
But when I put this on the IIS server, I get a 500 Internal Server Error:
500 – Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed
Must I configure IIS somewhere to achieve this, or has this an other cause?
Ensure that you have "Basic Authentication" installed for your IIS server.
Follow the steps as to how to manage which features are installed for IIS on your server by following the steps provided here: http://technet.microsoft.com/en-us/library/cc771209.aspx
Ensure that the feature "WWW-Service" -> "Security" -> "Basic Authentication" is selected.
Alternatively, ensure that the IIS user has the required rights to the folder/files of your site. Depending on what your site does, "Read and Execute" could be enough.
The user that is used for IIS7 is IIS_IUSRS.
Additional reading on the users of IIS can be found here: http://www.iis.net/learn/get-started/planning-for-security/understanding-built-in-user-and-group-accounts-in-iis
Already solved it!
I've discovered that there were two <modules> inside the <system.webServer> what caused the error
It works on localhost, but finds no default document on the webserver and complains about directory browsing being disabled. IIS7 on both, and both websites/app pools seem to be configured identically.
I've used the web api template in VS2012, which doesn't actually have any views. It only has an Index controller action in the HomeController.
Any ideas on why this could produce different behavior in the two environments?
So this addition to my web.config:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<system.webServer>
fixed the problem. It seems to be required in the web.config for IIS7 on Windows 2008 Server, but not for IIS7 on Windows 7.
I had a user trying to publish a MVC4 application on IIS7 getting this error, it turned out it was because the user had set the application pool to use .Net 2 instead of .Net 4. Instead of getting an error indicating this though they received the above error, and it was only when we added the above module the real issue was uncovered.
I'm trying to run a freshly created ASP.NET Website using C#, however when I do so it launches FireFox and attempts to connect to http://localhost:1295/WebSite1/Default.aspx (for example), but after about 10-15 seconds it displays a "Connection Interrupted - The connection to the server was reset while the page was loading." Error.
This issue is also present with older ASP.NET C# pages/Web Services I've built in the past, nothing is actually running off the ASP.NET Development server.
I am using: Windows XP Pro SP2, Visual Studio 2008
For reference I have SQL Server 2005 Developer Edition installed as well.
I have tried:
Browsing it with IE instead of Mozilla
Trying 2.0 framework instead of 3.5
Reinstalling Visual Studio 2008
This problem seems so trivial the more I think about it, but I havn't been able to work it out just yet! Appreciate any help on the matter.
I had the same problem, and when I was about to quit and run away and join a monastry I had an idea to check ELMAH - maybe it had caught it...
Sure enough, ELMAH told me it had caught this:
System.Web.HttpException (0x80004005): Maximum request length exceeded.
and this fixed it:
<system.web>
<httpRuntime maxRequestLength="65535" />
</system.web>
Good luck,
Dave
When you launch the application, a little info mark appears at the right bottom of your screen telling you that the local web server was started and on wich port. You should compare that port to the one that appears in your browser. If they are different, an anti-virus could be responsible for that problem.
Another place to look is your host file. Some software tweak this file and can make your localhost disbehave.
Something like Fiddler or another proxy like server could cause this issue if local addresses are proxied.
You can check this under Control Panel/Internet Options - Connections Tab, Click LAN Settings down the bottom.
Try adding "127.0.0.1 localhost" before the line reading "::1 localhost"
in c:\windows\system32\drivers\etc\hosts
This worked for me (VS2008, Vista Ultimate)
I had a similar problem on Windows 7 RC and Visual Studio 2008 SP1. Changing localhost to 127.0.0.1 helped. Similar to the hosts file solution, but doesn't require the file editing, you just need to change the project startup url.
I've the same problem, just instaled VS 2008 in a Vista Business machine. I have a LAN, but no proxy server and the c:\windows\system32\drivers\etc\hosts" with "127.0.0.1 localhost" are there. but none of my projects work, neither new ones.
"I had a similar problem on Windows 7 RC and Visual Studio 2008 SP1. Changing localhost to 127.0.0.1 helped. Similar to the hosts file solution, but doesn't require the file editing, you just need to change the project startup url."
This solution is working fine.......