jvcoach23 Posted January 13, 2004 Posted January 13, 2004 I have a site that I'm practicing on. I've created a folder with a few web pages in that folder. My problem is I can't get the response.redirect to go to pages in those folders. I've tried putting in the full http://address but that doesn't even work. Here is the specifics so hopefully someone can point out what I'm doing wrong. From the web site I created a folder called security. In that folder there is a page called rights.aspx. on my default page when entering the site there is a button that I've told... Response.Redirect("/Security/SecurityMain.aspx") when I run that I get an error 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: /Security/SecurityMain.aspx -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 can someone help please thanks shannon Quote JvCoach23 VB.Net newbie MS Sql Vet
Moderators Robby Posted January 13, 2004 Moderators Posted January 13, 2004 Do you have a Web.Config file in the Security directory, if so what does it contain? Quote Visit...Bassic Software
jvcoach23 Posted January 13, 2004 Author Posted January 13, 2004 no, i don't have one.. how should I go about creating one.. I have one in the root.... probably can't do a copy and past can I??? Quote JvCoach23 VB.Net newbie MS Sql Vet
Moderators Robby Posted January 13, 2004 Moderators Posted January 13, 2004 yes you can. Have you modified the original in your root? If not then just copy it as is. Quote Visit...Bassic Software
Moderators Robby Posted January 13, 2004 Moderators Posted January 13, 2004 Also, have you created a virtual directory for 'Security" ? If not then do so using IIS manager Quote Visit...Bassic Software
jvcoach23 Posted January 13, 2004 Author Posted January 13, 2004 does it need to be a virutal directory or an application. I created a virtual diretory.. now I think I have an error in my web config.. here is that error Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Source Error: Line 37: by Microsoft that offers a single logon and core profile services for member sites. Line 38: --> Line 39: <authentication mode="Windows" /> Line 40: Line 41: Source File: c:\inetpub\wwwroot\CallSchedulingII\Security\web.config Line: 39 I tried changing the line to be None instead of Windows, but it still doesn't work. Willing to help a little more. thanks shannon Quote JvCoach23 VB.Net newbie MS Sql Vet
vbFace Posted January 13, 2004 Posted January 13, 2004 Try changing: Response.Redirect("/Security/SecurityMain.aspx") to Response.Redirect("Security/SecurityMain.aspx") Quote
Moderators Robby Posted January 14, 2004 Moderators Posted January 14, 2004 You didn't mention that you were using uathentication, are you? If so you need to modify your web.config file in the sub-web. Quote Visit...Bassic Software
jvcoach23 Posted January 15, 2004 Author Posted January 15, 2004 Hey, sorry didn't get back to you yesterday.. I went in and tried to modify it.. but I must still be doing something incorrectly. I went into the security folder in IIS and told it to be an appliation. Authentication mode is none in web config. When I click on the button to take me to the securityMain.aspx page, I get this error. Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'CallSchedulingII.SecurityMain'. Source Error: Line 1: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="SecurityMain.aspx.vb" Inherits="CallSchedulingII.SecurityMain"%> Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Line 3: <HTML> Source File: c:\inetpub\wwwroot\CallSchedulingII\Security\SecurityMain.aspx Line: 1 sorry to continue to take up your time.. more help would be great. thanks shannon Quote JvCoach23 VB.Net newbie MS Sql Vet
Moderators Robby Posted January 15, 2004 Moderators Posted January 15, 2004 Is CallSchedulingII.SecurityMain the correct Namespace and Class ? Since you have not implemented any security yet (in web.config), then delete the virtual dir and re-create it without changing any security settings. My point is to get this up and running prior to implementing security. Quote Visit...Bassic Software
jvcoach23 Posted January 15, 2004 Author Posted January 15, 2004 I believe so.. when I drag the securitymain.aspx page to the code page i get http://localhost/CallSchedulingII/Security/SecurityMain.aspx I'm feeling pretty ignorant right now.. I don't know what you mean by is it in the correct class. it is in the pubic class webform1. The response.redirect. ok, it seems to be working now.. here is what I had to do, please tell comment on anything. I removed the virtual.. Then I went back and tried to recreate it but it told me that the name was not unique. So I delete and tried again.. same deal. I then deleted the folder from within .Net IDE (think that is what I'm suppose to call it) and created a new folder called security1. created the virutal called security1 and created the securitymain.aspx page under security1 folder. it's working now. Thanks for the help.. like I said, your advise is welcome.. extremely frustrating being a rookie. Quote JvCoach23 VB.Net newbie MS Sql Vet
Moderators Robby Posted January 15, 2004 Moderators Posted January 15, 2004 Now that you've got it working let us know when you're ready to add security. Good luck Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.