IIS7.5 throwing 404.17 error asp.net 4.0 webapplication - c#

I just deployed simple webapplication inside iis7.5 in win 7. No fancy stuff and simple web.config file. it throwing 404.17 error.
If I place index.html file. it works fine.. looks like asp.net and aspx page not working here.
Any suggestion will help me.
Edit: As makemoney2010 said,
I did revert to parent, but still not working. see below image which is handler mappings, anything missing here?

it is simple.it has not permission to execute script or those are not handled in iss configuration.You need to solve it.Click on you site select Mapping hanbdler and then from right pain revert to parent....even check permission on your folder. that's all and it should solve your issue
UPDATE:
This is tipical configuration of my webserver.
If you need assistance to setup your webserver i can help you contact me on skype with id turri.giorgio and i can help you via video conference or team viewer.
![enter image description here][1]

Related

HangerFire shows 404 error in Production server while deleting faile jobs

When I am trying to delete the failed jobs in the production server i am getting 404 error but I am able to delete them in my local PC.
URL
https://mywebsite.com/hangfire/jobs/failed/delete
HTTP ERROR 404
URL
https://localhost:59141/hangfire/jobs/failed/delete
HTTP 200
Can anyone let me know why this is happening on the production server only.
There is only one server behind this url..
Thanks in Advanceā€¦
The issue actually I am facing was - I deployed the hangfire application inside the sharepoint website in IIS.
The path deleting the job was something like this on button click
http://SharePointWebsite/MyAapplicationWebSite/hangfire/jobs/failed/delete
This is the path that is getting generated by the hangfire code internally(I added the hangfire assembly reference to my project). My Share Point application due to some configuration issues is not accepting this huge path. So i changed the path to
http://SharePointWebsite/MyAapplicationWebSite/hangfire/jobs/faileddelete
(I removed one "/" in the path) which worked for me.
How to change automatic generated path :
Take the HangFire Code from GitHub which is opensource now
In the Dashboard Pages you will find FailedJobsPage.cshtml. Update this page contents with the short url that you want.
But this cshtml will not be rendered until you run the custom tool - "razor generator tool"(VS Extension) for this cshtml page which generates cs file
You can see these cs files already present in the GitHub Code (expand the cshtml page you will find the cs file)
After finishing the above steps make sure the same path is configured in the DashboardRoutes.cs file as well.
=========================
"ExtensionlessUrlHandler-Integrated-4.0" in "handlers" section
of SharePoint Application web Config is causing the actual issue

Is there a way in Visual Studio to configure the default start page for web deployment starting from Empty ASP.NET Web App?

Entry level web developer here, thank you in advance.
A very basic single page website starting from Empty ASP.NET Web Application adding each and folder file from scratch. Everything works fine locally bare bones. I'm trying to configure the start page in the subfolder "html" to the file index.html. I get the default "This website has been successfully created" after publishing. Azure web service is working fine because I can go to site.azurewebsites.net/html/index.html to see my page after it's published.
Right clicking the project and going to properties to set as start page, or going to Properties>Specific Page doesn't work as suggested here for deployment but works fine locally. Altering the web.config file as suggested here gives me an internal server error that is fixed once I remove the code
<system.webServer>
<defaultDocument enabled="true">
<files>
<clear />
<add value="html/index.html"/>
</files>
</defaultDocument>
</system.webServer>
I tried different variations of this all with the same internal server error. Is my syntax correct?
I then created a global.asax file and changed the Application_Start line as suggested here:
protected void Application_Start(object sender, EventArgs e)
{
Response.Redirect("/HTML/index.html");
}
Same result.
Lastly, I created an App_Code folder with a RedirectHandler.cs file as suggested by Rion Williams's last suggestion (first link) along with his code and sure enough I get the same result.
"This web app has been successfully created" after publish but I see my desired start page after adding /html/index.html to the end of the url.
Understanding how basic this problem is I took extra care to exhaust as many google searches as I could find relating to the topic before asking this question. My first question on StackO so my reputation is too low to link each page I found. My next attempt is to just start a brand new MVC project and painstakingly rearrange every single file that way. I'm confident that will work but I didn't want to leave this simpler method without learning from what I did wrong especially when I know the answer is going to derp-slap me in the face.
Have you tried to configure the default document under the configuration tab for your website in Azure portal?
With a lot of changing file locations around, clearing cache, and rebooting to avoid server and runtime errors, #hernandgr had the simple option I hadn't known about (shame on me) and funny enough couldn't successfully google about.
It turns out that I didn't need to do any of the steps I had tried to configure the start page beyond just changing it in the configuration tab in the Azure Management Portal. I deleted the global.asax file and the App_Code folder completely, didn't need to touch the web.config in any way and didn't need to implement MVC.
One thing to be noted was that making index.html my start page through Azure seemed to push it up a directory so my CSS, JS, LESS, fonts, and images folders had to be moved up as well to display the page properly.

Google+ signin "Getting Started" project - problems with IIS

Using the C#/.NET Google+ sign-in quick start project, I'm hitting problems with IIS6. Here are the steps I followed:
downloaded the project from Github
modified the index.html and signin.ashx files to contain my Client ID and Client Secret
running the project on my machine (using the built in web server for Visual Studio 2010) works fine
published to Windows 2003 server with IIS6
added "index.html" as a default document for the web site
set the web site to use an app pool configured for the 4.0 .NET framework
attempted to access the page from Chrome
Accessing the site with no page specified on the URL (https://myserver.com/gplussample/) brings up the Google+ signin button. This works great and I'm taken to the page with my profile photo, circles, etc.
However, when I click the "disconnect" button, nothing happens. Using Chrome DevTools to examine the process, I see this error:
POST https://myserver.com/gplussample//disconnect 404 (Not Found)
The problem is the //disconnect - there's no page name (I believe it should be signin.ashx, as that's what works when I'm running the app on the dev web server with Visual Studio 2010).
I then attempted to access the site with a page name specified:
https://myserver.com/gplussample/signin.ashx
That results in a blank page and again, looking at the Chrome DevTools, I see a 400 Bad Request error for the .ashx handler. I searched and searched for solutions for .ashx handlers and "bad request" errors, with no success in this particular case.
Thinking IIS6 was the culprit, I published the site to an IIS7 instance.
With no page name specified on the URL (http://localhost/gplusoriginal/), I encountered the same error with the "disconnect" button - no action and a 404 error.
When I changed the URL to http://localhost/gplusoriginal/signin.ashx, I received this error:
Could not create type 'GPlus_ServerSideFlow.Signin'.
Again, back to Google and checking on .ashx handlers and issues with IIS7. I found a post about the web.config and specifying the handler there, so I tried that.
<system.webServer>
<handlers>
<add name="GPlus_ServerSideFlow.Signin" path="*.ashx" verb="*"
type="GPlus_ServerSideFlow.Signin" resourceType="Unspecified" />
</handlers>
</system.webServer>
Adding this snippet to the web.config resolved the "could not create type" error, but resulted in another 400 Bad Request error.
So, my questions are: What has to be done with II6 or IIS7 to get this sample project working? Are there additional steps in configuring IIS that need to be completed? Or something missing from the project code?
Thank you
The way that the sample works is that the RESTful endpoints are intercepted by an ashx handler, signin.ashx.cs. The handler can't be directly addressed so routes are setup in global.ashx.cs to map endpoints (/, /connect, /disconnect, etc) to that route handler.
As the sample ships, it assumes the built-in web server running on the root port. When moving to IIS, you need to change the path matchers from Equals to EndsWith in order to match the virtual directory you are deploying to:
// Redirect base path to signin.
if (context.Request.Path.EndsWith("/"))
{
context.Response.RedirectPermanent("signin.ashx");
}
// This is reached when the root document is passed. Return HTML
// using index.html as a template.
if (context.Request.Path.EndsWith("/signin.ashx"))
{
Apologies for the delay on this... but hopefully that fixes it! This fork of the C# starter has the changes in it, tested with IIS, and this update may end up getting merged back into the official sample soon.

IIS configuration: Navigation to the webpage was canceled when converting page to PDF using SautinSoft.PdfVision

I am having a problem when trying to convert an ASP .Net page to PDF using SautinSoft.PdfVision.
Using this library is quite straight forward, all you need to do is tho provide the URL of the page you want to convert and the PDF destination path.
SautinSoft.PdfVision v = new SautinSoft.PdfVision();
v.ConvertHtmlFileToPDFFile(url, pdfFilePath);
Instead of having the page I ask for to be rendered as PDF, I always get the one saying "Navigation to the webpage was canceled", as if IIS (version 7.5.7600.16385) was redirecting systematically my request.
In my development environment (Visual Studio Express 2012 for web, version 11.0.50727.1 RTMREL), I do not have this problem at all. Visual studio uses its own local web server whose configuration is the one by default and it works like a charm.
I added some log in the Page_Load event of the page I want to convert and for sure in my prod environment, this event is never triggered since I don't get any logs meaning the page never gets loaded. In my dev environment, my log does confirm that the pages is being loaded.
I have read a lot about this "Navigation webpage canceled" problem but all the answers I could find were about client side configuration, trust level in IE. I am using Chrome and its settings are the same whether I am debugging or hitting the prod server.
So my intuition really tells me something is going wrong on the server side.
So does anyone of you know about some IIS configuration that could fix my problem?
Thanks for your help.
I also faced similar kind of issues when using sautinsoft PDFVision
Solution:
in iis select your websites---> go to ssl settings --> client certificate --> ignore
this works for me
other chances if above not work:
goto application pool --> advanced settings---> loaduserprofile=true

after publishing website, Internal URL did not work

I design a website by Umbraco. Before that I published it. All everything was OK.
But after publishing, link to internal webPages did not work.
befor publishing:
"http://localhost:4402/testgroup/testgroup01/testitem01.aspx?nodeId=1400"
after publishing:
"http://localhost/testgroup/testgroup01/testitem01.aspx?nodeId=1400"
I do not konw what to do..
PLEASE HELP ME.
Note:
In code behind, at the beginning of href tag, added "/.." or "/~" or "~" but did not work.
All "" created dynamically by HtmlGenericControl
I found it!
I create a website in IIS in "Sites" node.(already exist in "Default Web Site"). and I gave a port for website (for example 5050).
It be solved.
Thank you from all of you that try to solve my problem.
Try to set the bindings in the advanced settings of your website at the IIS to this:
http::4402:
Provide that code, the way you link to the pages in your ".cs"
If virtual path is /NAMAAD then use the http://localhost/NAMAAD/ as a base and go down to the page you need.
Also, I cannot see the folders testgroup or testgroup01 in the NAMAAD, check where exactly is the page you want.

Categories