Unable to view stylesheet in chrome - c#

Tried to run http://localhost:30832/stylesheet/login.css but it returned
This localhost page can’t be found No webpage was found for the web
address: http://localhost:30832/stylesheet/login.css HTTP ERROR 404
What is happening? I am very sure the naming is correct and it exists.

Related

Fiddler showing 404 but the site is loading

Wen m trying to fire an api through the fiddler, its showing 404. On the other hand, the site is loading properly.
Your sites loads successfully, cause your 2nd request shows a 200 for localhost (and I bet this is a GET request). After the site is loaded, it seems to contain some javascript code that tries to connect to some login site (with POST to aaweb.authorassists.com) and that fails.

Invalid verb showing in Reponse.Redirect

I have a page redirection code like this Response.Redirect(..//Home//Index.aspx); The code gives Invalid verb 400 error. But if i change Response.Redirect to Server.Transfer the code works fine. Also the Response.Redirect code works fine if i access the page with localhost but if i access it with IP i get invalid verb 400 error. The code works fine outside of my network. The 400 code comes only in chrome and not in firefox. I know in case of Reponse.Redirect the browser will initiate a 302 GET request but why is it showing invalid verb?

Downloading files to remote server HTTP 400 error

Program uses DownloadString function of Web.Client.
The url's I have tried so far:
http://xxx.xxx.x.xx/blabla.ashx?command=blabla - Http 404
http://xxx.xxx.x.xx:port/blabla.ashx?command=blabla - Http 400
When I type
http://xxx.xxx.x.xx
IIS page shows up as expected.
Problem solved now. It seems you have to add a binding to IIS to use an address in remote machine.

IIS throwing HTTP 404 not found but resource exists. Requested URL also changing automatically.!

I'm facing a really weird scenario here with my local IIS. I have hosted multiple sites in the default website in my local IIS. One of them has the login page. From the login page, I'm redirecting the user to another page that is located in another site (which is also hosted in the same IIS inside default website virtual directory).
Now in the submit button click event of my login page, after authenticating the user, I have written a "Response.Redirect(redirect_url)". the redirect_url is being formed dynamically and given as a parameter to the Redirect method.
While debugging, the final redirect_url that is being sent as parameter to Redirect method is:
http://localhost/CP/web/console/console.aspx?sk=3e3cc1a8-73c4-4945-b3f8-08af22ea4324.50008
But after I try to go to the next step, I'm suddenly getting a HTTP 404 error saying that the resource doesn't exist and I have observed that Requested URL shown in the error page is different that what was dynamically sent to the Response.Redirect(...) method.
In the error page, the requested url shows the value as
http://localhost/CP/web/console/localhost/CPLogin?err=5
whereas my actual requested url formed in the code is:
http://localhost/CP/web/console/console.aspx?sk=3e3cc1a8-73c4-4945-b3f8-08af22ea4324.50008
I'm just unable to understand why the requested url is getting changed automatically.! Also, I observe that "localhost" is being appended to the requested URL again which is not what is supposed to happen.
Please visit THIS link[^] to understand this question more clearly. I have added screen shot of the error page.
http://amoghnatu.wordpress.com/2013/09/16/question-please-help-iis-throwing-http-404-not-found-but-requested-resource-actually-exists-requested-url-also-changing-automatically/[^]
Thanks a lot.!
Indeed, the problem was with the way I had hosted the sites in my application. I just removed all the sites related to my application from IIS and then hosted all of them again much more carefully. This resolved the "wrong redirect url" problem.
Also, I had some tables with missing required data because of which I was getting the error code.
So after I got all the tables filled with the required data and also after properly hosting the application in IIS, my problem got resolved.
In IIS, go to relevant folder, right click and "browse". Check out what is the URL. In most cases, this is due to the URL should have port number appended. For instance it will be something like :
http://localhost:<port number>/CP/web/console/console.aspx?sk=3e3cc1a8-73c4-4945-b3f8-08af22ea4324.50008
instead of
http://localhost/CP/web/console/console.aspx?sk=3e3cc1a8-73c4-4945-b3f8-08af22ea4324.50008

Server Error in '/' Application, The resource cannot be found

Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /public/google_setup.aspx
I am getting the above error when i host the site on the server. In my local computer it is working fine. google_setup.aspx is referring to a master page which is also on the server. I have developed other pages using that master page before and they are working fine.
Any idea what is wrong.
If someone can suggest a way to get little bit more detail information on this error i would be able to fix it
Sounds to me like you are facing a problem with relative and absolute URLs.
Try using the ~ (tilde) and runat="server" when you link to your page:
<asp:HyperLink
NavigateUrl="~/public/google_setup.aspx"
runat="server">Google Setup</asp:HyperLink>
or
Google Setup

Categories

Resources