Showing posts with label link. Show all posts
Showing posts with label link. Show all posts

Thursday, March 29, 2012

Passing values between User Controls

I programmatically add a user control to a page which has a data grid on it. The user can then click on a link button to drill down to detail information.

What I would like to do is unload the existing user control and add the new user control with the data grid showing the detail information.

The question is how do I pass the key values from the existing user control to the new user control ?

Thanks

MarkYou can add your Items to the CurrentContext in order to pass from one control to another or from Page to an control


Context.Items.Add("MyValue", myValue)

To retrieve


Context.Items["MyValue"]

The problem here is when I click on the LinkButton on the DataGrid its going to cause the Parent page to reload itself and in the parents Page_Load subroutine its going to unload the existing Datagrid and load up the User Control with the detail DataGrid on. Therefore, it will never pass through the LinkButton's event to set the Context value.

Unless the secret is to load up both User Controls, on the Post Back, but hide the Header DataGrid ? Or to use client side code to pass the key of the selected record to a hidden field which will get submitted back to the server and be available much sooner in the process ?

I would be interested to here what people think would be the best way of doing this or whether there is a way to still use the Context stuff.

Cheers

Mark
Hi,

you could use a delegate.This article explains it how you could do it.

Grz, Kris.
Here Context is the HttpContext which is always available in a page and user controls. You can use this on the Page Load to store some values and then retrieve it later in the User controls as shown in my previous post.

Passing values from a datagrid w/ a HyperLinkColumn

I have successfully populated my datagrid. It consists of only one column. THis column is a link. What I am trying to do is send the text of the link (also what is pulled from the DB) to the aspx page that the link submits to.

I'm open to all suggestions as I'm new and trying to learn all different ways possible.

Thanks!

HDYour column should look like this :


<Columns>
<asp:HyperLinkColumn DataNavigateUrlField="DepartmentID" DataNavigateUrlFormatString="default.aspx?DepartmentID={0}"
DataTextField="DepartmentName" HeaderText="Departments :" ItemStyle-CssClass="side "></asp:HyperLinkColumn>
</Columns>

The DataNavigateUrl field gets placed where the {0} is in the DataNavigateUrlFormatString. DataText is the displayed link text.

On the next page you can pick up the value using Request.Params("DepartmentID")

Simon
Great thanks. However I am receiving the following where I try to do the Request.Params("fieldName").


"'System.Web.HttpRequest.Params' denotes a 'property' where a 'method' was expected"

The line of code throwing the error is :


TextBox1.Text = Request.Params("SelectedCategory");

Thanks for your help, and forgive the stupid questions.

HD
Nevermind. I figured it out. I changed the line of code to

Request.Params.Get("SelectedCategory")

HD

Monday, March 26, 2012

passing variable to open a new window

I am new to asp.net. I am wondering how I can open a new window from a button or link. I need to pass a value so both windows are linked. I will appreciate any help, code vb.net

The main page has a label is that stores the ID number, I need to pass this value so I can display in the new window information about this id. Please help. Thanks.

use the Querystring to pass variables to other pages

ie.


Response.Redirect("www.myplace.com/mynewpage.aspx?someValue=399393","_blank");

check this out

http://www.codeproject.com/aspnet/QueryString.asp

hth,

mcm


how about javascript?

<asp:button onclientClick='window.open(.....);' Text='Open New Window' runat=server />


Thanks for the answer. However, I need to open a new window. Could you please help me out? I am using vb.net. Thanks.

javascript DOES open a new window.

read about it. -->http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

mcm


You can test the below code in page_load event which will open a new window using javascript

Page.ClientScript.RegisterStartupScript(me.GetType(),"open","window.open('WebForm2.aspx?id=123','','height=400,width=300');",true)

Where WebForm2.aspx is the name of the window you would like to open. Now in webform2 you can get the value of id using

Dim id as String = Request.QueryString("id")

HC


Yes. But I need to pass from the current window, a value which is saved in a label, to the new window. Thanks for the answer.

dim yourPassInVar as string

Page.ClientScript.RegisterStartupScript(me.GetType(),"open","window.open('WebForm2.aspx?id='" + yourPassInVar + ",'','height=400,width=300');",true)

How about this?



In the current window page_load event use the below code if you want the window to open direclty when the page is being loaded

Page.ClientScript.RegisterStartupScript(me.GetType(),"open","window.open('WebForm2.aspx?id=' + '"+Label1.Text+"','','height=400,width=300');",true)

If you want for example to open it on button click event use the below code

Button1.Attributes.Add("onclick","window.open('WebForm2.aspx?id=' + '"+Label1.Text+"','','height=400,width=300');")

Where Button1 is the button you want to open the window when being clicked

HC


Thanks. How can I do it with a button? When clicking on the button, the variable that holds the id value let's say 123 will be passed to webform2.aspx. Again, thanks for the help.

Great. Thank you for all the help!

;-)

passing variable to new page with LinkButton

I need to pass a variable from a master page to a details page when a user clicks on a link in a DataList. Right now I have a link button, but I don't know how to put the variable into the link at runtime. Hopefully this is just a matter of syntax? How can I make this work?

<asp:DataListID="DataList1"runat="server"DataSourceID="SqlDataSource1">

<ItemTemplate><asp:LinkButtonID="NameLinkButton"runat="server"Text='<%# Eval("Name") %>'PostBackUrl="details.aspx?sponsorID={0}"Font-Bold="true"></asp:LinkButton>

...

</ItemTemplate></asp:DataList>

try this tutorial

Tuorial #4 Understanding Web Application State in the begnner section ofhttp://www.asp.net/learn/videos/default.aspx?tabid=63#howdoi

helped me out alot on understanding how to pass from one page to the other.

Ragscoon =<^_^>=


could you define a string variable and set it equal to the text property of your linkbutton (I'm assuming the text property will be the data item you want to pass to your other page). Then add that string variable to the querystring that will be passed to your other page.

I had to do something like you are doing, except it was a linkbutton in a gridview. It came out like this:

sLocationCode = grdLocationCode.DataKeys(iIndex).Item("ALCODE").ToString()
sCountryCode = grdLocationCode.DataKeys(iIndex).Item("ALCCODE").ToString()
Response.Redirect("LocationCodeDetail.aspx?" & sCountryCode & ";" & sLocationCode)

I believe this addresses your question.


Thanks for the responses. What I am asking is: what is the syntax for concatenating the destination URL with the variable that I want to pass (the sponsorID)?

If I use:

<

asp:HyperLinkID="NameLabel"runat="server"Text='<%# Eval("Sponsor") %>'NavigateUrl='myDetails.aspx?sponsorID=<%# Eval("SponsorID") %>'Font-Bold="true"></asp:HyperLink>

I get:

http://localhost:2097/myFolder/myDetails.aspx?sponsorID=<%#%20Eval("SponsorID")%20%>

It does not parse the SponsorID variable.


To clarify the last line in my previous message:

I get:

http://localhost:2097/myFolder/myDetails.aspx?sponsorID=<%#%20Eval("SponsorID")%20%>It does not parse the SponsorID variable.

Wednesday, March 21, 2012

Passing variables problem

Hi i have a folowing problem
I have a textbox and a link.
When i click a link i would like to pass and value of the txtDeadLine,
but i do not know sintax.
Here is what i have:

<asp:TextBox id="txtDeadLine" runat="server" Width="100px"
CssClass="DDiText"></asp:TextBox
<A
onclick="window.open('Kalendar.aspx?textbox=txtDeadLine','c al','width=25
0,height=300,left=270,top=180')"
href="javascript:;"><IMG src="http://pics.10026.com/?src=Slike\cal.gif" border="0"></A
I know that what i need is something like this.

<A onclick="window.open('Kalendar.aspx?textbox=txtDeadLine&Value='Here i
do not know, ...

Thanks
Alexandar

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!You could a client side javacript function such as :

function MyAction()
{
window.open('url.asp?prm='+MyForm.elements["txtDeadLine"].value);
}

--

"acko bogicevic" <aconi2002@.yahoo.com> a crit dans le message de
news:%23qKpHmUyDHA.1524@.TK2MSFTNGP10.phx.gbl...
> Hi i have a folowing problem
> I have a textbox and a link.
> When i click a link i would like to pass and value of the txtDeadLine,
> but i do not know sintax.
> Here is what i have:
> <asp:TextBox id="txtDeadLine" runat="server" Width="100px"
> CssClass="DDiText"></asp:TextBox>
> <A
> onclick="window.open('Kalendar.aspx?textbox=txtDeadLine','c al','width=25
> 0,height=300,left=270,top=180')"
> href="http://links.10026.com/?link=javascript:;"><IMG src="http://pics.10026.com/?src=Slike\cal.gif" border="0"></A>
> I know that what i need is something like this.
> <A onclick="window.open('Kalendar.aspx?textbox=txtDeadLine&Value='Here i
> do not know, ...
> Thanks
> Alexandar
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Friday, March 16, 2012

password confirmation - how?

There is a link to the sample code that you can download on the top right
side of the page.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"timmso" <timmsoNoSpammies@dotnet.itags.org.Yahoo.com> wrote in message
news:OQhhc3hkDHA.2216@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> Thanks...but...how do I implement your suggestion? Is there a sample
> application I can run? Your page doesn't provide a .sln file. What am I
> supposed to do with all of the supporting files?
> If my concerns sound ignorant, please excuse me...I am new to .net. How
can
> I get your help to work for me?
>
> "Steve C. Orr [MVP, MCSD]" <Steve@dotnet.itags.org.Orr.net> wrote in message
> news:#Kod3vhkDHA.2404@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> > Forms Authentication is likely your best bet.
> > It is easily configured in your web.config file.
> > Here's more information:
> > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://Steve.Orr.net
> > Hire top-notch developers at http://www.able-consulting.com
> > "timmso" <timmsoNoSpammies@dotnet.itags.org.Yahoo.com> wrote in message
> > news:%23o3VQGhkDHA.1488@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> > > I have a simple asp.net project. How do I enforce that a password be
> > entered
> > > before accessing any part of the website?
> > > > Thanks.
> > >Yeah, I know. Like I said, I have the supporting files, but there's no
".sln" file. What am I supposed to do with all the supporting files? Don't I
need the 'solution' file to run the app?

"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> There is a link to the sample code that you can download on the top right
> side of the page.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
>
> "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > Thanks...but...how do I implement your suggestion? Is there a sample
> > application I can run? Your page doesn't provide a .sln file. What am I
> > supposed to do with all of the supporting files?
> > If my concerns sound ignorant, please excuse me...I am new to .net. How
> can
> > I get your help to work for me?
> > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > Forms Authentication is likely your best bet.
> > > It is easily configured in your web.config file.
> > > Here's more information:
> > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > --
> > > I hope this helps,
> > > Steve C. Orr, MCSD, MVP
> > > http://Steve.Orr.net
> > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > I have a simple asp.net project. How do I enforce that a password be
> > > entered
> > > > before accessing any part of the website?
> > > > > > Thanks.
> > > > > > > >
If it has a vbproj or a cproj or can open it that way.

If it has neither of these files then create a new project in vs.net and add
the files manually. To add the files, just right click on the project in
the Solution Manager, click add, then click Add Existing Files.

"timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> Yeah, I know. Like I said, I have the supporting files, but there's no
> ".sln" file. What am I supposed to do with all the supporting files? Don't
I
> need the 'solution' file to run the app?
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > There is a link to the sample code that you can download on the top
right
> > side of the page.
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://Steve.Orr.net
> > Hire top-notch developers at http://www.able-consulting.com
> > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > Thanks...but...how do I implement your suggestion? Is there a sample
> > > application I can run? Your page doesn't provide a .sln file. What am
I
> > > supposed to do with all of the supporting files?
> > > > If my concerns sound ignorant, please excuse me...I am new to .net.
How
> > can
> > > I get your help to work for me?
> > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > Forms Authentication is likely your best bet.
> > > > It is easily configured in your web.config file.
> > > > Here's more information:
> > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > --
> > > > I hope this helps,
> > > > Steve C. Orr, MCSD, MVP
> > > > http://Steve.Orr.net
> > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > I have a simple asp.net project. How do I enforce that a password
be
> > > > entered
> > > > > before accessing any part of the website?
> > > > > > > > Thanks.
> > > > > > > > > > > > > > >
Thanks. I put it in C:\Inetpub\wwwroot\DemoFormsAuth, tried to run it and
got the error message:

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 19: "Forms", "Passport" and "None"
Line 20: -->
Line 21: <authentication mode="Forms">
Line 22: <forms name="myform" loginUrl="login.aspx" />
Line 23: </authentication
How do I correct this?

"Jim Shelly" <jshelly@.cherokee.org> wrote in message
news:esQlR0skDHA.3700@.TK2MSFTNGP11.phx.gbl...
> If it has a vbproj or a cproj or can open it that way.
> If it has neither of these files then create a new project in vs.net and
add
> the files manually. To add the files, just right click on the project in
> the Solution Manager, click add, then click Add Existing Files.
> "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> > Yeah, I know. Like I said, I have the supporting files, but there's no
> > ".sln" file. What am I supposed to do with all the supporting files?
Don't
> I
> > need the 'solution' file to run the app?
> > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > > There is a link to the sample code that you can download on the top
> right
> > > side of the page.
> > > > --
> > > I hope this helps,
> > > Steve C. Orr, MCSD, MVP
> > > http://Steve.Orr.net
> > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > > Thanks...but...how do I implement your suggestion? Is there a
sample
> > > > application I can run? Your page doesn't provide a .sln file. What
am
> I
> > > > supposed to do with all of the supporting files?
> > > > > > If my concerns sound ignorant, please excuse me...I am new to .net.
> How
> > > can
> > > > I get your help to work for me?
> > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > > Forms Authentication is likely your best bet.
> > > > > It is easily configured in your web.config file.
> > > > > Here's more information:
> > > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > > > --
> > > > > I hope this helps,
> > > > > Steve C. Orr, MCSD, MVP
> > > > > http://Steve.Orr.net
> > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > > I have a simple asp.net project. How do I enforce that a
password
> be
> > > > > entered
> > > > > > before accessing any part of the website?
> > > > > > > > > > Thanks.
> > > > > > > > > > > > > > > > > > > > > > > >

password confirmation - how?

There is a link to the sample code that you can download on the top right
side of the page.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"timmso" <timmsoNoSpammies@dotnet.itags.org.Yahoo.com> wrote in message
news:OQhhc3hkDHA.2216@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> Thanks...but...how do I implement your suggestion? Is there a sample
> application I can run? Your page doesn't provide a .sln file. What am I
> supposed to do with all of the supporting files?
> If my concerns sound ignorant, please excuse me...I am new to .net. How
can
> I get your help to work for me?
>
> "Steve C. Orr [MVP, MCSD]" <Steve@dotnet.itags.org.Orr.net> wrote in message
> news:#Kod3vhkDHA.2404@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> > Forms Authentication is likely your best bet.
> > It is easily configured in your web.config file.
> > Here's more information:
> > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://Steve.Orr.net
> > Hire top-notch developers at http://www.able-consulting.com
> > "timmso" <timmsoNoSpammies@dotnet.itags.org.Yahoo.com> wrote in message
> > news:%23o3VQGhkDHA.1488@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> > > I have a simple asp.net project. How do I enforce that a password be
> > entered
> > > before accessing any part of the website?
> > > > Thanks.
> > >Yeah, I know. Like I said, I have the supporting files, but there's no
".sln" file. What am I supposed to do with all the supporting files? Don't I
need the 'solution' file to run the app?

"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> There is a link to the sample code that you can download on the top right
> side of the page.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
>
> "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > Thanks...but...how do I implement your suggestion? Is there a sample
> > application I can run? Your page doesn't provide a .sln file. What am I
> > supposed to do with all of the supporting files?
> > If my concerns sound ignorant, please excuse me...I am new to .net. How
> can
> > I get your help to work for me?
> > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > Forms Authentication is likely your best bet.
> > > It is easily configured in your web.config file.
> > > Here's more information:
> > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > --
> > > I hope this helps,
> > > Steve C. Orr, MCSD, MVP
> > > http://Steve.Orr.net
> > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > I have a simple asp.net project. How do I enforce that a password be
> > > entered
> > > > before accessing any part of the website?
> > > > > > Thanks.
> > > > > > > >
If it has a vbproj or a cproj or can open it that way.

If it has neither of these files then create a new project in vs.net and add
the files manually. To add the files, just right click on the project in
the Solution Manager, click add, then click Add Existing Files.

"timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> Yeah, I know. Like I said, I have the supporting files, but there's no
> ".sln" file. What am I supposed to do with all the supporting files? Don't
I
> need the 'solution' file to run the app?
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > There is a link to the sample code that you can download on the top
right
> > side of the page.
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://Steve.Orr.net
> > Hire top-notch developers at http://www.able-consulting.com
> > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > Thanks...but...how do I implement your suggestion? Is there a sample
> > > application I can run? Your page doesn't provide a .sln file. What am
I
> > > supposed to do with all of the supporting files?
> > > > If my concerns sound ignorant, please excuse me...I am new to .net.
How
> > can
> > > I get your help to work for me?
> > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > Forms Authentication is likely your best bet.
> > > > It is easily configured in your web.config file.
> > > > Here's more information:
> > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > --
> > > > I hope this helps,
> > > > Steve C. Orr, MCSD, MVP
> > > > http://Steve.Orr.net
> > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > I have a simple asp.net project. How do I enforce that a password
be
> > > > entered
> > > > > before accessing any part of the website?
> > > > > > > > Thanks.
> > > > > > > > > > > > > > >
Thanks. I put it in C:\Inetpub\wwwroot\DemoFormsAuth, tried to run it and
got the error message:

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 19: "Forms", "Passport" and "None"
Line 20: -->
Line 21: <authentication mode="Forms">
Line 22: <forms name="myform" loginUrl="login.aspx" />
Line 23: </authentication
How do I correct this?

"Jim Shelly" <jshelly@.cherokee.org> wrote in message
news:esQlR0skDHA.3700@.TK2MSFTNGP11.phx.gbl...
> If it has a vbproj or a cproj or can open it that way.
> If it has neither of these files then create a new project in vs.net and
add
> the files manually. To add the files, just right click on the project in
> the Solution Manager, click add, then click Add Existing Files.
> "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> > Yeah, I know. Like I said, I have the supporting files, but there's no
> > ".sln" file. What am I supposed to do with all the supporting files?
Don't
> I
> > need the 'solution' file to run the app?
> > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > > There is a link to the sample code that you can download on the top
> right
> > > side of the page.
> > > > --
> > > I hope this helps,
> > > Steve C. Orr, MCSD, MVP
> > > http://Steve.Orr.net
> > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > > Thanks...but...how do I implement your suggestion? Is there a
sample
> > > > application I can run? Your page doesn't provide a .sln file. What
am
> I
> > > > supposed to do with all of the supporting files?
> > > > > > If my concerns sound ignorant, please excuse me...I am new to .net.
> How
> > > can
> > > > I get your help to work for me?
> > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > > Forms Authentication is likely your best bet.
> > > > > It is easily configured in your web.config file.
> > > > > Here's more information:
> > > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > > > --
> > > > > I hope this helps,
> > > > > Steve C. Orr, MCSD, MVP
> > > > > http://Steve.Orr.net
> > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > > I have a simple asp.net project. How do I enforce that a
password
> be
> > > > > entered
> > > > > > before accessing any part of the website?
> > > > > > > > > > Thanks.
> > > > > > > > > > > > > > > > > > > > > > > >
Go into IIS.
Find the folder.
Go into properties.
Click on the "Create" application button.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
news:OsxXUIukDHA.2000@.TK2MSFTNGP12.phx.gbl...
> Thanks. I put it in C:\Inetpub\wwwroot\DemoFormsAuth, tried to run it and
> got the error message:
> 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 19: "Forms", "Passport" and "None"
> Line 20: -->
> Line 21: <authentication mode="Forms">
> Line 22: <forms name="myform" loginUrl="login.aspx" />
> Line 23: </authentication>
>
> How do I correct this?
>
> "Jim Shelly" <jshelly@.cherokee.org> wrote in message
> news:esQlR0skDHA.3700@.TK2MSFTNGP11.phx.gbl...
> > If it has a vbproj or a cproj or can open it that way.
> > If it has neither of these files then create a new project in vs.net and
> add
> > the files manually. To add the files, just right click on the project
in
> > the Solution Manager, click add, then click Add Existing Files.
> > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> > > Yeah, I know. Like I said, I have the supporting files, but there's no
> > > ".sln" file. What am I supposed to do with all the supporting files?
> Don't
> > I
> > > need the 'solution' file to run the app?
> > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > > > There is a link to the sample code that you can download on the top
> > right
> > > > side of the page.
> > > > > > --
> > > > I hope this helps,
> > > > Steve C. Orr, MCSD, MVP
> > > > http://Steve.Orr.net
> > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > > > Thanks...but...how do I implement your suggestion? Is there a
> sample
> > > > > application I can run? Your page doesn't provide a .sln file. What
> am
> > I
> > > > > supposed to do with all of the supporting files?
> > > > > > > > If my concerns sound ignorant, please excuse me...I am new to
..net.
> > How
> > > > can
> > > > > I get your help to work for me?
> > > > > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > > > Forms Authentication is likely your best bet.
> > > > > > It is easily configured in your web.config file.
> > > > > > Here's more information:
> > > > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > > > > > --
> > > > > > I hope this helps,
> > > > > > Steve C. Orr, MCSD, MVP
> > > > > > http://Steve.Orr.net
> > > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > > > I have a simple asp.net project. How do I enforce that a
> password
> > be
> > > > > > entered
> > > > > > > before accessing any part of the website?
> > > > > > > > > > > > Thanks.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Thanks..that helps for that error. Now when I run it I get the 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: File or assembly name System.Web, or one of its
dependencies, was not found.

Source Error:

Line 56: -->
Line 57: <httpHandlers>
Line 58: <add verb="*" path="*.vb"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 59: <add verb="*" path="*.cs"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 60: <add verb="*" path="*.vbproj"
type="System.Web.HttpNotFoundHandler,System.Web" /
Source File: c:\inetpub\wwwroot\DemoFormsAuth\web.config Line: 58

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System.Web' could not be loaded.

I can see line 58 in the web.config file. Thanks for your patience.

"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:OCO1#S0kDHA.2536@.tk2msftngp13.phx.gbl...
> Go into IIS.
> Find the folder.
> Go into properties.
> Click on the "Create" application button.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
> "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> news:OsxXUIukDHA.2000@.TK2MSFTNGP12.phx.gbl...
> > Thanks. I put it in C:\Inetpub\wwwroot\DemoFormsAuth, tried to run it
and
> > got the error message:
> > 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 19: "Forms", "Passport" and "None"
> > Line 20: -->
> > Line 21: <authentication mode="Forms">
> > Line 22: <forms name="myform" loginUrl="login.aspx" />
> > Line 23: </authentication>
> > How do I correct this?
> > "Jim Shelly" <jshelly@.cherokee.org> wrote in message
> > news:esQlR0skDHA.3700@.TK2MSFTNGP11.phx.gbl...
> > > If it has a vbproj or a cproj or can open it that way.
> > > > If it has neither of these files then create a new project in vs.net
and
> > add
> > > the files manually. To add the files, just right click on the
project
> in
> > > the Solution Manager, click add, then click Add Existing Files.
> > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> > > > Yeah, I know. Like I said, I have the supporting files, but there's
no
> > > > ".sln" file. What am I supposed to do with all the supporting files?
> > Don't
> > > I
> > > > need the 'solution' file to run the app?
> > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > > > > There is a link to the sample code that you can download on the
top
> > > right
> > > > > side of the page.
> > > > > > > > --
> > > > > I hope this helps,
> > > > > Steve C. Orr, MCSD, MVP
> > > > > http://Steve.Orr.net
> > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > > > > Thanks...but...how do I implement your suggestion? Is there a
> > sample
> > > > > > application I can run? Your page doesn't provide a .sln file.
What
> > am
> > > I
> > > > > > supposed to do with all of the supporting files?
> > > > > > > > > > If my concerns sound ignorant, please excuse me...I am new to
> .net.
> > > How
> > > > > can
> > > > > > I get your help to work for me?
> > > > > > > > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > > > > Forms Authentication is likely your best bet.
> > > > > > > It is easily configured in your web.config file.
> > > > > > > Here's more information:
> > > > > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > > > > > > > --
> > > > > > > I hope this helps,
> > > > > > > Steve C. Orr, MCSD, MVP
> > > > > > > http://Steve.Orr.net
> > > > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > I have a simple asp.net project. How do I enforce that a
> > password
> > > be
> > > > > > > entered
> > > > > > > > before accessing any part of the website?
> > > > > > > > > > > > > > Thanks.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
It really shouldn't be this hard. I wonder if your .NET framework is set up
correctly.
Are you able to run other ASP.NET web apps with no problem?
You may need to repair your IIS mappings.
To do this, run the following command:
aspnet_regiis.exe -i

Here's further information:
http://support.microsoft.com/defaul...B;EN-US;q306005

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
news:e1BIU43kDHA.2512@.TK2MSFTNGP09.phx.gbl...
> Thanks..that helps for that error. Now when I run it I get the 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: File or assembly name System.Web, or one of its
> dependencies, was not found.
> Source Error:
>
> Line 56: -->
> Line 57: <httpHandlers>
> Line 58: <add verb="*" path="*.vb"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> Line 59: <add verb="*" path="*.cs"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> Line 60: <add verb="*" path="*.vbproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
>
> Source File: c:\inetpub\wwwroot\DemoFormsAuth\web.config Line: 58
> Assembly Load Trace: The following information can be helpful to determine
> why the assembly 'System.Web' could not be loaded.
>
> I can see line 58 in the web.config file. Thanks for your patience.
>
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:OCO1#S0kDHA.2536@.tk2msftngp13.phx.gbl...
> > Go into IIS.
> > Find the folder.
> > Go into properties.
> > Click on the "Create" application button.
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://Steve.Orr.net
> > Hire top-notch developers at http://www.able-consulting.com
> > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > news:OsxXUIukDHA.2000@.TK2MSFTNGP12.phx.gbl...
> > > Thanks. I put it in C:\Inetpub\wwwroot\DemoFormsAuth, tried to run it
> and
> > > got the error message:
> > > > 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 19: "Forms", "Passport" and "None"
> > > Line 20: -->
> > > Line 21: <authentication mode="Forms">
> > > Line 22: <forms name="myform" loginUrl="login.aspx" />
> > > Line 23: </authentication>
> > > > > How do I correct this?
> > > > > "Jim Shelly" <jshelly@.cherokee.org> wrote in message
> > > news:esQlR0skDHA.3700@.TK2MSFTNGP11.phx.gbl...
> > > > If it has a vbproj or a cproj or can open it that way.
> > > > > > If it has neither of these files then create a new project in vs.net
> and
> > > add
> > > > the files manually. To add the files, just right click on the
> project
> > in
> > > > the Solution Manager, click add, then click Add Existing Files.
> > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> > > > > Yeah, I know. Like I said, I have the supporting files, but
there's
> no
> > > > > ".sln" file. What am I supposed to do with all the supporting
files?
> > > Don't
> > > > I
> > > > > need the 'solution' file to run the app?
> > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > > news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > > > > > There is a link to the sample code that you can download on the
> top
> > > > right
> > > > > > side of the page.
> > > > > > > > > > --
> > > > > > I hope this helps,
> > > > > > Steve C. Orr, MCSD, MVP
> > > > > > http://Steve.Orr.net
> > > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > > > > > Thanks...but...how do I implement your suggestion? Is there
a
> > > sample
> > > > > > > application I can run? Your page doesn't provide a .sln file.
> What
> > > am
> > > > I
> > > > > > > supposed to do with all of the supporting files?
> > > > > > > > > > > > If my concerns sound ignorant, please excuse me...I am new to
> > .net.
> > > > How
> > > > > > can
> > > > > > > I get your help to work for me?
> > > > > > > > > > > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > > > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > Forms Authentication is likely your best bet.
> > > > > > > > It is easily configured in your web.config file.
> > > > > > > > Here's more information:
> > > > > > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > > > > > > > > > --
> > > > > > > > I hope this helps,
> > > > > > > > Steve C. Orr, MCSD, MVP
> > > > > > > > http://Steve.Orr.net
> > > > > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > > I have a simple asp.net project. How do I enforce that a
> > > password
> > > > be
> > > > > > > > entered
> > > > > > > > > before accessing any part of the website?
> > > > > > > > > > > > > > > > Thanks.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Yes, I am able to run anything else I create. Granted, they've been simple
apps, but I haven't had these problems before.

> You may need to repair your IIS mappings.
> To do this, run the following command:
> aspnet_regiis.exe -i

Ok, did that, but the same error occurs.

Is there anything else I can try?

"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:eObSL$4kDHA.3320@.tk2msftngp13.phx.gbl...
> It really shouldn't be this hard. I wonder if your .NET framework is set
up
> correctly.
> Are you able to run other ASP.NET web apps with no problem?
> You may need to repair your IIS mappings.
> To do this, run the following command:
> aspnet_regiis.exe -i
> Here's further information:
> http://support.microsoft.com/defaul...B;EN-US;q306005
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
> "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> news:e1BIU43kDHA.2512@.TK2MSFTNGP09.phx.gbl...
> > Thanks..that helps for that error. Now when I run it I get the 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: File or assembly name System.Web, or one of its
> > dependencies, was not found.
> > Source Error:
> > Line 56: -->
> > Line 57: <httpHandlers>
> > Line 58: <add verb="*" path="*.vb"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > Line 59: <add verb="*" path="*.cs"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > Line 60: <add verb="*" path="*.vbproj"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > Source File: c:\inetpub\wwwroot\DemoFormsAuth\web.config Line: 58
> > Assembly Load Trace: The following information can be helpful to
determine
> > why the assembly 'System.Web' could not be loaded.
> > I can see line 58 in the web.config file. Thanks for your patience.
> > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > news:OCO1#S0kDHA.2536@.tk2msftngp13.phx.gbl...
> > > Go into IIS.
> > > Find the folder.
> > > Go into properties.
> > > Click on the "Create" application button.
> > > > --
> > > I hope this helps,
> > > Steve C. Orr, MCSD, MVP
> > > http://Steve.Orr.net
> > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > news:OsxXUIukDHA.2000@.TK2MSFTNGP12.phx.gbl...
> > > > Thanks. I put it in C:\Inetpub\wwwroot\DemoFormsAuth, tried to run
it
> > and
> > > > got the error message:
> > > > > > 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 19: "Forms", "Passport" and "None"
> > > > Line 20: -->
> > > > Line 21: <authentication mode="Forms">
> > > > Line 22: <forms name="myform" loginUrl="login.aspx" />
> > > > Line 23: </authentication>
> > > > > > > > How do I correct this?
> > > > > > > > "Jim Shelly" <jshelly@.cherokee.org> wrote in message
> > > > news:esQlR0skDHA.3700@.TK2MSFTNGP11.phx.gbl...
> > > > > If it has a vbproj or a cproj or can open it that way.
> > > > > > > > If it has neither of these files then create a new project in
vs.net
> > and
> > > > add
> > > > > the files manually. To add the files, just right click on the
> > project
> > > in
> > > > > the Solution Manager, click add, then click Add Existing Files.
> > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> > > > > > Yeah, I know. Like I said, I have the supporting files, but
> there's
> > no
> > > > > > ".sln" file. What am I supposed to do with all the supporting
> files?
> > > > Don't
> > > > > I
> > > > > > need the 'solution' file to run the app?
> > > > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > > > news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > > > > > > There is a link to the sample code that you can download on
the
> > top
> > > > > right
> > > > > > > side of the page.
> > > > > > > > > > > > --
> > > > > > > I hope this helps,
> > > > > > > Steve C. Orr, MCSD, MVP
> > > > > > > http://Steve.Orr.net
> > > > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > Thanks...but...how do I implement your suggestion? Is
there
> a
> > > > sample
> > > > > > > > application I can run? Your page doesn't provide a .sln
file.
> > What
> > > > am
> > > > > I
> > > > > > > > supposed to do with all of the supporting files?
> > > > > > > > > > > > > > If my concerns sound ignorant, please excuse me...I am new
to
> > > .net.
> > > > > How
> > > > > > > can
> > > > > > > > I get your help to work for me?
> > > > > > > > > > > > > > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > > > > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > > Forms Authentication is likely your best bet.
> > > > > > > > > It is easily configured in your web.config file.
> > > > > > > > > Here's more information:
> > > > > > > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > > > > > > > > > > > --
> > > > > > > > > I hope this helps,
> > > > > > > > > Steve C. Orr, MCSD, MVP
> > > > > > > > > http://Steve.Orr.net
> > > > > > > > > Hire top-notch developers at
http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > I have a simple asp.net project. How do I enforce that a
> > > > password
> > > > > be
> > > > > > > > > entered
> > > > > > > > > > before accessing any part of the website?
> > > > > > > > > > > > > > > > > > Thanks.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Add a reference to System.Web.DLL
It should already be referenced but in your case it sounds like it might not
be for some reason.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
news:ur52hl5kDHA.2200@.TK2MSFTNGP12.phx.gbl...
> Yes, I am able to run anything else I create. Granted, they've been simple
> apps, but I haven't had these problems before.
> > You may need to repair your IIS mappings.
> > To do this, run the following command:
> > aspnet_regiis.exe -i
> Ok, did that, but the same error occurs.
> Is there anything else I can try?
>
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:eObSL$4kDHA.3320@.tk2msftngp13.phx.gbl...
> > It really shouldn't be this hard. I wonder if your .NET framework is
set
> up
> > correctly.
> > Are you able to run other ASP.NET web apps with no problem?
> > You may need to repair your IIS mappings.
> > To do this, run the following command:
> > aspnet_regiis.exe -i
> > Here's further information:
> > http://support.microsoft.com/defaul...B;EN-US;q306005
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://Steve.Orr.net
> > Hire top-notch developers at http://www.able-consulting.com
> > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > news:e1BIU43kDHA.2512@.TK2MSFTNGP09.phx.gbl...
> > > Thanks..that helps for that error. Now when I run it I get the 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: File or assembly name System.Web, or one of its
> > > dependencies, was not found.
> > > > Source Error:
> > > > > Line 56: -->
> > > Line 57: <httpHandlers>
> > > Line 58: <add verb="*" path="*.vb"
> > > type="System.Web.HttpNotFoundHandler,System.Web" />
> > > Line 59: <add verb="*" path="*.cs"
> > > type="System.Web.HttpNotFoundHandler,System.Web" />
> > > Line 60: <add verb="*" path="*.vbproj"
> > > type="System.Web.HttpNotFoundHandler,System.Web" />
> > > > > Source File: c:\inetpub\wwwroot\DemoFormsAuth\web.config Line: 58
> > > > Assembly Load Trace: The following information can be helpful to
> determine
> > > why the assembly 'System.Web' could not be loaded.
> > > > > I can see line 58 in the web.config file. Thanks for your patience.
> > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > news:OCO1#S0kDHA.2536@.tk2msftngp13.phx.gbl...
> > > > Go into IIS.
> > > > Find the folder.
> > > > Go into properties.
> > > > Click on the "Create" application button.
> > > > > > --
> > > > I hope this helps,
> > > > Steve C. Orr, MCSD, MVP
> > > > http://Steve.Orr.net
> > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > news:OsxXUIukDHA.2000@.TK2MSFTNGP12.phx.gbl...
> > > > > Thanks. I put it in C:\Inetpub\wwwroot\DemoFormsAuth, tried to run
> it
> > > and
> > > > > got the error message:
> > > > > > > > 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 19: "Forms", "Passport" and "None"
> > > > > Line 20: -->
> > > > > Line 21: <authentication mode="Forms">
> > > > > Line 22: <forms name="myform" loginUrl="login.aspx" />
> > > > > Line 23: </authentication>
> > > > > > > > > > > How do I correct this?
> > > > > > > > > > > "Jim Shelly" <jshelly@.cherokee.org> wrote in message
> > > > > news:esQlR0skDHA.3700@.TK2MSFTNGP11.phx.gbl...
> > > > > > If it has a vbproj or a cproj or can open it that way.
> > > > > > > > > > If it has neither of these files then create a new project in
> vs.net
> > > and
> > > > > add
> > > > > > the files manually. To add the files, just right click on the
> > > project
> > > > in
> > > > > > the Solution Manager, click add, then click Add Existing Files.
> > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> > > > > > > Yeah, I know. Like I said, I have the supporting files, but
> > there's
> > > no
> > > > > > > ".sln" file. What am I supposed to do with all the supporting
> > files?
> > > > > Don't
> > > > > > I
> > > > > > > need the 'solution' file to run the app?
> > > > > > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > > > > news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > > > > > > > There is a link to the sample code that you can download on
> the
> > > top
> > > > > > right
> > > > > > > > side of the page.
> > > > > > > > > > > > > > --
> > > > > > > > I hope this helps,
> > > > > > > > Steve C. Orr, MCSD, MVP
> > > > > > > > http://Steve.Orr.net
> > > > > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > > > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > > Thanks...but...how do I implement your suggestion? Is
> there
> > a
> > > > > sample
> > > > > > > > > application I can run? Your page doesn't provide a .sln
> file.
> > > What
> > > > > am
> > > > > > I
> > > > > > > > > supposed to do with all of the supporting files?
> > > > > > > > > > > > > > > > If my concerns sound ignorant, please excuse me...I am new
> to
> > > > .net.
> > > > > > How
> > > > > > > > can
> > > > > > > > > I get your help to work for me?
> > > > > > > > > > > > > > > > > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in
message
> > > > > > > > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > Forms Authentication is likely your best bet.
> > > > > > > > > > It is easily configured in your web.config file.
> > > > > > > > > > Here's more information:
> > > > > > > > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > > > > > > > > > > > > > --
> > > > > > > > > > I hope this helps,
> > > > > > > > > > Steve C. Orr, MCSD, MVP
> > > > > > > > > > http://Steve.Orr.net
> > > > > > > > > > Hire top-notch developers at
> http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > > > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > > I have a simple asp.net project. How do I enforce that
a
> > > > > password
> > > > > > be
> > > > > > > > > > entered
> > > > > > > > > > > before accessing any part of the website?
> > > > > > > > > > > > > > > > > > > > Thanks.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
>
That didn't help, sorry. I can see the reference already there. However,
here is what I did. I started a new ASP.Net project. Then imported all of
the code from the dotnetbips website. I left alone the web.config
file/didn't overwrite it. Then I ran it and the authentication worked.

At least it's a start..now I can "play" with it. Thanks for your help.

"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:ucyAlE6kDHA.2444@.TK2MSFTNGP09.phx.gbl...
> Add a reference to System.Web.DLL
> It should already be referenced but in your case it sounds like it might
not
> be for some reason.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
> "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> news:ur52hl5kDHA.2200@.TK2MSFTNGP12.phx.gbl...
> > Yes, I am able to run anything else I create. Granted, they've been
simple
> > apps, but I haven't had these problems before.
> > > You may need to repair your IIS mappings.
> > > To do this, run the following command:
> > > aspnet_regiis.exe -i
> > Ok, did that, but the same error occurs.
> > Is there anything else I can try?
> > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > news:eObSL$4kDHA.3320@.tk2msftngp13.phx.gbl...
> > > It really shouldn't be this hard. I wonder if your .NET framework is
> set
> > up
> > > correctly.
> > > Are you able to run other ASP.NET web apps with no problem?
> > > You may need to repair your IIS mappings.
> > > To do this, run the following command:
> > > aspnet_regiis.exe -i
> > > > Here's further information:
> > > http://support.microsoft.com/defaul...B;EN-US;q306005
> > > > --
> > > I hope this helps,
> > > Steve C. Orr, MCSD, MVP
> > > http://Steve.Orr.net
> > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > news:e1BIU43kDHA.2512@.TK2MSFTNGP09.phx.gbl...
> > > > Thanks..that helps for that error. Now when I run it I get the
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: File or assembly name System.Web, or one of
its
> > > > dependencies, was not found.
> > > > > > Source Error:
> > > > > > > > Line 56: -->
> > > > Line 57: <httpHandlers>
> > > > Line 58: <add verb="*" path="*.vb"
> > > > type="System.Web.HttpNotFoundHandler,System.Web" />
> > > > Line 59: <add verb="*" path="*.cs"
> > > > type="System.Web.HttpNotFoundHandler,System.Web" />
> > > > Line 60: <add verb="*" path="*.vbproj"
> > > > type="System.Web.HttpNotFoundHandler,System.Web" />
> > > > > > > > Source File: c:\inetpub\wwwroot\DemoFormsAuth\web.config Line: 58
> > > > > > Assembly Load Trace: The following information can be helpful to
> > determine
> > > > why the assembly 'System.Web' could not be loaded.
> > > > > > > > I can see line 58 in the web.config file. Thanks for your patience.
> > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > news:OCO1#S0kDHA.2536@.tk2msftngp13.phx.gbl...
> > > > > Go into IIS.
> > > > > Find the folder.
> > > > > Go into properties.
> > > > > Click on the "Create" application button.
> > > > > > > > --
> > > > > I hope this helps,
> > > > > Steve C. Orr, MCSD, MVP
> > > > > http://Steve.Orr.net
> > > > > Hire top-notch developers at http://www.able-consulting.com
> > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > news:OsxXUIukDHA.2000@.TK2MSFTNGP12.phx.gbl...
> > > > > > Thanks. I put it in C:\Inetpub\wwwroot\DemoFormsAuth, tried to
run
> > it
> > > > and
> > > > > > got the error message:
> > > > > > > > > > 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 19: "Forms", "Passport" and "None"
> > > > > > Line 20: -->
> > > > > > Line 21: <authentication mode="Forms">
> > > > > > Line 22: <forms name="myform" loginUrl="login.aspx" />
> > > > > > Line 23: </authentication>
> > > > > > > > > > > > > > How do I correct this?
> > > > > > > > > > > > > > "Jim Shelly" <jshelly@.cherokee.org> wrote in message
> > > > > > news:esQlR0skDHA.3700@.TK2MSFTNGP11.phx.gbl...
> > > > > > > If it has a vbproj or a cproj or can open it that way.
> > > > > > > > > > > > If it has neither of these files then create a new project in
> > vs.net
> > > > and
> > > > > > add
> > > > > > > the files manually. To add the files, just right click on
the
> > > > project
> > > > > in
> > > > > > > the Solution Manager, click add, then click Add Existing
Files.
> > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > > news:e9btdrqkDHA.1656@.tk2msftngp13.phx.gbl...
> > > > > > > > Yeah, I know. Like I said, I have the supporting files, but
> > > there's
> > > > no
> > > > > > > > ".sln" file. What am I supposed to do with all the
supporting
> > > files?
> > > > > > Don't
> > > > > > > I
> > > > > > > > need the 'solution' file to run the app?
> > > > > > > > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> > > > > > > > news:u9dGrznkDHA.744@.tk2msftngp13.phx.gbl...
> > > > > > > > > There is a link to the sample code that you can download
on
> > the
> > > > top
> > > > > > > right
> > > > > > > > > side of the page.
> > > > > > > > > > > > > > > > --
> > > > > > > > > I hope this helps,
> > > > > > > > > Steve C. Orr, MCSD, MVP
> > > > > > > > > http://Steve.Orr.net
> > > > > > > > > Hire top-notch developers at
http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > > > > news:OQhhc3hkDHA.2216@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > Thanks...but...how do I implement your suggestion? Is
> > there
> > > a
> > > > > > sample
> > > > > > > > > > application I can run? Your page doesn't provide a .sln
> > file.
> > > > What
> > > > > > am
> > > > > > > I
> > > > > > > > > > supposed to do with all of the supporting files?
> > > > > > > > > > > > > > > > > > If my concerns sound ignorant, please excuse me...I am
new
> > to
> > > > > .net.
> > > > > > > How
> > > > > > > > > can
> > > > > > > > > > I get your help to work for me?
> > > > > > > > > > > > > > > > > > > > > > > > > > "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in
> message
> > > > > > > > > > news:#Kod3vhkDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > > Forms Authentication is likely your best bet.
> > > > > > > > > > > It is easily configured in your web.config file.
> > > > > > > > > > > Here's more information:
> > > > > > > > > > > http://www.dotnetbips.com/displayarticle.aspx?id=9
> > > > > > > > > > > > > > > > > > > > --
> > > > > > > > > > > I hope this helps,
> > > > > > > > > > > Steve C. Orr, MCSD, MVP
> > > > > > > > > > > http://Steve.Orr.net
> > > > > > > > > > > Hire top-notch developers at
> > http://www.able-consulting.com
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > "timmso" <timmsoNoSpammies@.Yahoo.com> wrote in message
> > > > > > > > > > > news:%23o3VQGhkDHA.1488@.TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > > > I have a simple asp.net project. How do I enforce
that
> a
> > > > > > password
> > > > > > > be
> > > > > > > > > > > entered
> > > > > > > > > > > > before accessing any part of the website?
> > > > > > > > > > > > > > > > > > > > > > Thanks.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >