IIS 7.0 - Every Site Suddenly Redirecting Root Request To Forms Authentication?
Apr 30, 2010
Suddenly, IIS 7.0 is redirecting every request for the root of any domain hosted on the box to ~/Account/Logon, which is our Forms Authentication redirect. Additionally, some JavaScript and image requests are being similarly redirected, but not other aspx pages.
EDIT: It turns out that something has gone wrong with the disk permissions. Can anyone point me to the way things are supposed to be in Windows Server 2008 for a standard ASP.Net installation? The disk permissions are out of whack now.
View 1 Replies
Similar Messages:
Sep 17, 2010
How can you request the root default.aspx without specifying it in the url for your root application?e.g. ttp://localhost/MyApp/ instead of http://localhost/MyApp/Default.aspxshould be able to do bothI'm not sure if this is a setting in IIS 7.5 for the application or what.
View 3 Replies
Apr 4, 2011
I have an existing asp.net mvc website that uses basic forms authentication. The site has a login page that posts back to a login action, which logs the user in via FormsAuthentication.SetAuthCookie(). I am looking to add an api to the site, as an mvc2 area, where users would be authenticated based on a token passed as an http header. This area will consist of only json actions, so redirecting the user to a login page doesn't make sense. Instead, I want the users to just pass a token along with each request. That token is mapped to each user account and the user would be authenticated automatically.
I'm struggling with where to put this logic. At this point, the best choice seems to be adding the header lookup logic and authentication to the Global.asax in the Application_AuthenticateRequest method. I want to avoid needing to redirect the user after calling FormsAuthentication.SetAuthCookie(), though. I want the login action to be transparent to them. Am I approaching this the wrong way? As a side note: Requiring a username/password for api requests is not possible, as the site has a mix of users. Some joined using OpenID while the rest joined with a username/password.
View 1 Replies
Feb 11, 2011
I am using iis 5.1 in which we have only only one default website, I have two projects v2 and v3 my website points to v2 projects and have some folders images, styles etc now i have a virtual directory under this website that is hosting project v3 and having the same folder hierarchy as v2 in the home page of the both projects i have img src="imagesedlogo.gif" alt="logo"/> but this shows the same image that is in the v2 directory, How can i show different images for both projects. using "" get the root of the web site but how can i get the root of virtual directory under that website
View 2 Replies
Aug 31, 2010
I have a simple ASP.NET 3.5 application running under IIS7 under a virtual directory. So the URL of my app is like http://site.com/app. I want to 301-redirect the request to site.com/app/default.aspx to site.com/app for better SEO. I have to do this redirect through code only, not by any IIS settings. I am unable to do so via code mentioned in this article:
[URL]
The code:
if (request.RawUrl.Equals("/default.aspx"))
{
newUrl = string.Format("{0}://{1}{2}",
request.Url.Scheme,
request.Url.Authority,
request.RawUrl.Remove(request.RawUrl.LastIndexOf("/default.aspx", StringComparison.OrdinalIgnoreCase)));
context.Response.Status = "301 moved permanently";
context.Response.AddHeader("Location", newUrl);
}
seems to go into an infinite loop when the application is under a virtual directory. the request.RawUrl property always returns "/default.aspx" even after a 301 redirect causing the infinite loop.
View 3 Replies
Jul 12, 2010
I have set the authentication timeout and session timeout in web.config is 100 (in minutes).LoginName control shows logged in username and logout link.After 15-20 min LoginName control shows nothing and login link regardless my authentication timeout(which is 100).I can work on that page till server trip is not happen.
View 1 Replies
Jul 27, 2010
WebApp1: on IIS and configured with Windows authentication. Get User account from AD.
WebAPP2: a java web app on another windows box in same domain with authentication from AD
On web app1, I have a http handler like
public class MyHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string url = "http://WebApp2/Test";
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(url);
CredentialCache myCache = new CredentialCache();
NetworkCredential netCredential = new NetworkCredential("myname", "mypassword", "");
myCache.Add(new Uri(url), "Basic", netCredential);
//...
myReq.Credentials = myCache;
//....
}
}
in above way, I can set authentication in code and pass it WebApp2.
But I don't want to put name and password in code. User info already available on WebApp1: in context.User I can find out the user info who already logined into WebApp1, so I want to pass this credential to WebApp2. I have tried to do following:
myReq.Credentials = CredentialCache.DefaultCredentials;
but I am failed becuast there is no data in CredentialCache.DefaultCredentials.
View 1 Replies
Feb 28, 2011
i am getting this error when requesting a page on my project.it was running fine before but suddenly it keeps me throwing this error.i am straching my hair over this.
[Code]....
View 4 Replies
Feb 22, 2011
If have the following web.config:
<configuration>
<system.web>
<authentication mode="Forms">
<forms name="MembershipCookie"
loginUrl="Login.aspx"
protection="All"
[code]...
View 1 Replies
Sep 6, 2010
I've been asked to create an expansion in ASP.NET (at say www.newsite.com) to a current website (at, say www.oldsite.com) that uses WordPress. The existing site will have a new link added to it, when clicked this will link to my new content. So far, so simple, however it has been requested that the address displayed be the same as the existing site- i.e. when the user clicks on a link to the new site it goes to my new site but the address shown is still www.oldsite.com/newcontent rather than www.newsite.com
I probably haven't explained this very well, but is it possible to do this without modification of the original site as this is maintained by a different company.
View 3 Replies
Sep 23, 2010
We have a weird issue found during setting up a new Windows 2003 Server with IIS6.0 & ASP.NET 2.0, our site is built using ASP.NET forms authentication with general authorization to deny access to all users & allow explicitly to static, home pages etc, -- web.config setting for forms auth looking as below:
<authentication mode="Forms">
<forms name="appNameAuth" path="/" loginUrl="~/Pages/Users/Login.aspx" protection="All" timeout="60" defaultUrl="~/Pages/Inner.aspx">
</fo </authentication
View 1 Replies
Jun 29, 2010
In asp.net we specify the redirect url when using forms authentications like this:
<authentication mode="Forms">
<forms name="myApp" loginUrl="Login.aspx" protection="All" defaultUrl="default.aspx" path="/" requireSSL="false"/>
</authentication>
this means that when a user log in, will be redirected to "default.aspx" using this method
FormsAuthentication.RedirectFromLoginPage(IDTextBox.Text, RememberCheckBox.Checked);
Now is it possible to make the user choose which page to be redirected to prior to login? for example the user chooses from a list the page to login to prior to login then when authenticated be redirected to this page instead of the default.aspx page. is that possible and if so how can this be done?
View 1 Replies
Jul 25, 2010
I am using VWD 2010 on a windows 7 64 bit install. Using forms authentication I am not being redirected to the login page when not authenticated yet. Even if I start a new web site from template, clear out all cookies, I still go directly to default.aspx. The LoginView control displays the anonymous template verifing I am not authenticated.
configuration why redirection doesn't occur? Remember I am trying this with New Web site template with no mods so I don't think config issue is within application code.
View 3 Replies
Jan 3, 2010
Is not a lot of fun of yielding much success at the moment.
When I copy my web site on the local machine some of the CSS classes in my themes are not applied. Although not major, I am concerned at what may be causing this.
My real problem is regard the root of the site. On my personal machin, I have set the root of my site using the tilde syntax. However, the root of the web site on my host's ftp site is wwwroot.
Does this mean that I need to change a setting somewhere for the page to be recognised?
View 4 Replies
Apr 4, 2011
I want to completely understand how to use relative and absolute url address in static and dynamic files.~ : / :.. : in a relative URL indicates the parent directory . : efers to the current directory / : always replaces the entire pathname of the base RL// : always replaces everything from the hostname onwardsThis example is easy when you are working without virtual directory. But i am working on virtual directory
View 1 Replies
Apr 13, 2010
In our application we are using forms authentication, we have given defaulturl also in the config file. But the problem is that it is not getting redirected to the default url when the session timeout is occuring.
View 2 Replies
Apr 4, 2011
We have a web site up and are moving to a new site, with a more modern design and some jQuery/ajax features for better usability. The old site is on IIS6 and the new one is on IIS7.5. The old site is on domain.com and the new site is on beta.domain.com. I want to test out how the load will affect the new server, so I want to begin sending users to the new site slowly. I want to start sending every 20th user to the new site and save a cookie so that a user that was directed to the new site will always be directed to the new site and a user which was directed to the old site will always be directed to the old site, as long as we don't change a key and "reset" the system.I was wondering where would be the best place to implement this behavior / logic?
View 2 Replies
Mar 15, 2011
Let's say that I have my ASP.NET web application in a directory called "MyApp" both locally and on a remote server. I'm trying to build an onclick response to a link. The response calls a Javascript function, passing it the URL of an .aspx page in my web app. The Javascript pops out a new window displaying the page. My C# code looks like this:
link = new HyperLink();
link.Text = product_num_str;
link.NavigateUrl = "#";[code]....
I started using the Request's Authority property because I was having problems running locally on the Visual Studio web server when I used the Host property. The problem was that Host only returned "localhost" instead of the host and port number. When tested locally, the code works because the "authority" maps to my app root folder. The URL generated is, e.g.,
http://localhost:52071/ProductInfo.aspx?_num=123
If I run on a remote server, however, I end up with something like: http://company-server/ProductInfo.aspx?_num=123
This fails to find the page, because in this case the "MyApp" root folder must be included.There is probably an easier way - putting an entry in the web.config or something. My motivation originally was to allow the app to be published to a folder of any name and work as is. I could hack my approach and search the string for "localhost" or something, but that's ugly. So how do I build a string that will work everywhere?
View 1 Replies
Sep 28, 2010
I am a PHP developer and have been asked to make some slight amendments to an ASP.net site. I can make these amendments but the biggest challenge seems to be getting the actual site up and running on my own server! I have a had lots of errors with regards to the paths to files, as the website is linked absolutely to the root folder and on my development server I cannot have the files at the root. I have therefore worked my way through some of the files making the paths relative so I can at least see some of the site running but then I came across this error:
CS0103: The name 'Data' does not exist in the current context
Line 5: protected void Page_Load(object sender, EventArgs args)
Line 6: {
Line 7: rptNews.DataSource = Data.NewsArticle.GetLatestNews(3);
Line 8: rptNews.DataBind();
Line 9: }
I assume this is something to do with data being called from a database. How to get the site and database up and running as I have no idea where to start and feel I am going round in circles.
View 4 Replies
Jan 27, 2011
On a MVC 3 site I have a area named "CMS" on on CMSAreaRegistration I have:
[Code]....
All the CMS controller are under the namespace Site.CMS.Controllers And in Global.Asax I have:
[Code]....
The CMS routes seem to work as expected. But the following link on my site root:
[Code]....
I tried many options to try to solve it but I always get something wrong.
View 13 Replies
Mar 10, 2010
I'm using Form Authentication in my web application.In my application I have a lot of pop up windows that include form inside.when the form ticket expires the user is redireced to Login page.Also it happens inside a popup window. If user leaves the pop up open and come back after the ticket is expired, it redirects him to the Login inside that pop up.
View 11 Replies
Jan 19, 2011
how can i specify two different login pages in root web.config file since i need to have authentication for two folders.for securing My Account module i did like this in the root folder i need to have it for another folder called EBox also.
View 1 Replies
Apr 5, 2010
Recently I start having customers that are not able to login into my site. I have used the same code for months and I can login and authenticate fine it is happening on some customers not all. That is why is so hard to recreate the problem.
What is happening the customer tries to login and get redirected back to loging page. In config file I have this
[Code]....
I can not think of some else, maybe cookies not able on client, or any other security issue, IE version.
View 5 Replies
Mar 26, 2011
So my website works great on my local computer. It also works fine when I use the Copy Web Site feature in Visual Web Developer 2010 Express. But I do not want all of my files and the default.aspx to be sitting at the root of my domain name. I want it to be in a subfolder.
So again, it works fine when it's sitting at www.domainname.com
But when I use my FTP program to move the files to:
www.domainname.com/subfolder/
I get an error when I try to visit the site. It's just a general runtime error and does not display the specific error message. It obviously must have something to do with when I MOVE the files/folders from the root of the domain to the subfolder?
View 2 Replies
Apr 28, 2010
I know that to use link a view found in one view to one in another, i need to use;
[Code]....
But what if i want to link FROM an area to a view in the root of the site? This view is in the views folder found in the root, NOT in any area.
View 2 Replies