Thursday, March 29, 2012

Manually Clear Session Object and State Server

We are using State Server to host our session objects.
We have several applications running under IIS that will be using the State
Server.
How can one of those applications clear its Session state? If it was in
process, we could just stop and start the web app. We can not just stop and
start the State Server service because it would wipe out state for all
applications.
Thanks,
fmHi Fm,
Thanks for your posting. As for the problem you mentioned, I think there is
no buildin means for managea certain single application's session state
since the state server is run as a windows service on the server and
haven't any particular managment interface. But you may try modifying the
asp.net application's web.config to change the sessionstate mode to see
wheher this can make the stateserver session invalidated. For example,
change the Session Mode to InProc and run the applicaiton, then change it
back to StateServer Mode.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Hi Steven,
I have tried tried that in the past and I just reconfirmed it that switching
the session from InProc and back to StateServer restores the values sitting
in StateServer.
A hack I tried is setting the Timeout to 1 minute. But the session has to be
idle for the original 20 minutes before this new timeout takes affect.
Quite frustrating. Seems like an even bigger hack will be required like
having an administrator drop an include file on the server that each request
will check to see if it should call Session.RemoveAll or something.
Hopefully ASP.NET and IIS6 will be more robust then the current ASP IIS5
solution for the development team that requested this requirement so they
won't need it.
Thanks,
fm
"Steven Cheng[MSFT]" wrote:

> Hi Fm,
> Thanks for your posting. As for the problem you mentioned, I think there i
s
> no buildin means for managea certain single application's session state
> since the state server is run as a windows service on the server and
> haven't any particular managment interface. But you may try modifying the
> asp.net application's web.config to change the sessionstate mode to see
> wheher this can make the stateserver session invalidated. For example,
> change the Session Mode to InProc and run the applicaiton, then change it
> back to StateServer Mode.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Hi Steven,
Another that came to me, can more then one instance of State Server run on a
server?
Thanks,
Fm
"Steven Cheng[MSFT]" wrote:

> Hi Fm,
> Thanks for your posting. As for the problem you mentioned, I think there i
s
> no buildin means for managea certain single application's session state
> since the state server is run as a windows service on the server and
> haven't any particular managment interface. But you may try modifying the
> asp.net application's web.config to change the sessionstate mode to see
> wheher this can make the stateserver session invalidated. For example,
> change the Session Mode to InProc and run the applicaiton, then change it
> back to StateServer Mode.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Hi Fm,
AS for instance of StateServer, I think only one is existing on a
StateServer machine because the asp.net statserver is run as a windows
service, you can find it in the server's service list. Thanks.
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Manually Configure site for ASP .NET 2 - Revisited

Same problem here, but with Windows XP x64 Edition. I'm trying to setup the
default DotNetNuke website and get:

Configuring web site http//localhost/DotNetNuke to ASP .NET 2.0 failed. You
may need to manually configure this site for ASP.NET 2.0 in order for you
site to run correctly.

Then I run:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i
The error indicates that IIS is in 64 bit mode, while this application is a
32 b
it application and thus not compatible.

Hmmm. Change IIS to 32 bit operation somehow? or is there an ASP problem?
Ideas?

Windows XP x64 Edition
Visual Web Developer 2005 Express Editon
Athalon 2.2Ghz cpu (don't remember which model)
2GB ram
Too much hard disk
eVGA 6xxx gs video
Current with Microsoft updates.

Tried to repair VWD install, but that didn't make any difference.

Thanks,
David

Quote:

Originally Posted by

Hi
>
I am using Visual Studio 2005 on windows XP professional (with IIS).
>
Following the walkthrough provided by help "creating web page for mobile
devices" , I have created a website , but as soon as I carry out the last
step in creating the website , as the website is being loaded in the IDE ,
I
get error message "Configuring web site http//localhost/DeviceWalkthrough
to ASP .NET 2.0 failed. You may need to manually configure this site for
ASP
.NET 2.0 in order for you site to run correctly ".
>
Could you please tell me how can I manually configure the site ?
>
>
Thank you.
>
>

Hi

Hope this link should help you.

http://aspalliance.com/groups/micro..._ASP_NET_2.aspx
Prem

"D" wrote:

Quote:

Originally Posted by

Same problem here, but with Windows XP x64 Edition. I'm trying to setup the
default DotNetNuke website and get:
>
Configuring web site http//localhost/DotNetNuke to ASP .NET 2.0 failed. You
may need to manually configure this site for ASP.NET 2.0 in order for you
site to run correctly.
>
Then I run:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i
The error indicates that IIS is in 64 bit mode, while this application is a
32 b
it application and thus not compatible.
>
Hmmm. Change IIS to 32 bit operation somehow? or is there an ASP problem?
Ideas?
>
Windows XP x64 Edition
Visual Web Developer 2005 Express Editon
Athalon 2.2Ghz cpu (don't remember which model)
2GB ram
Too much hard disk
eVGA 6xxx gs video
Current with Microsoft updates.
>
Tried to repair VWD install, but that didn't make any difference.
>
Thanks,
David
>

Quote:

Originally Posted by

Hi

I am using Visual Studio 2005 on windows XP professional (with IIS).

Following the walkthrough provided by help "creating web page for mobile
devices" , I have created a website , but as soon as I carry out the last
step in creating the website , as the website is being loaded in the IDE ,
I
get error message "Configuring web site http//localhost/DeviceWalkthrough
to ASP .NET 2.0 failed. You may need to manually configure this site for
ASP
.NET 2.0 in order for you site to run correctly ".

Could you please tell me how can I manually configure the site ?

Thank you.


>
>
>

Manually Configure site for ASP .NET 2

Hi

I am using Visual Studio 2005 on windows XP professional (with IIS).

Following the walkthrough provided by help "creating web page for mobile
devices" , I have created a website , but as soon as I carry out the last
step in creating the website , as the website is being loaded in the IDE , I
get error message "Configuring web site http//localhost/DeviceWalkthrough
to ASP .NET 2.0 failed. You may need to manually configure this site for ASP
..NET 2.0 in order for you site to run correctly ".

Could you please tell me how can I manually configure the site ?

Thank you.Hi Gol,

To set a site to use ASP.NET 2.0, right click on your web
application/virtual directory and select properties. From there, under the
ASP.NET-tab, select "ASP.NET version: 2.0.50727".

If the ASP.NET tab isn't there, you need to install ASP.NET. Run
"aspnet_regiis.exe -i" from a command window. (The .exe is located in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727).

Good luck!

Regards,
Nils Magnus

"Gol Yass" <gol_e_yass@.yahoo.comwrote in message
news:eceb8o$9741@.news-dxb.emirates.net.ae...

Quote:

Originally Posted by

Hi
>
I am using Visual Studio 2005 on windows XP professional (with IIS).
>
Following the walkthrough provided by help "creating web page for mobile
devices" , I have created a website , but as soon as I carry out the last
step in creating the website , as the website is being loaded in the IDE ,
I
get error message "Configuring web site http//localhost/DeviceWalkthrough
to ASP .NET 2.0 failed. You may need to manually configure this site for
ASP
.NET 2.0 in order for you site to run correctly ".
>
Could you please tell me how can I manually configure the site ?
>
>
Thank you.
>
>


Thank you very much ! I ran aspnet_regiis and it solved the problem :)

"Nils Magnus" <nmee@.nmee.netwrote in message
news:OZHun%23bxGHA.1420@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

Hi Gol,
>
To set a site to use ASP.NET 2.0, right click on your web
application/virtual directory and select properties. From there, under the
ASP.NET-tab, select "ASP.NET version: 2.0.50727".
>
If the ASP.NET tab isn't there, you need to install ASP.NET. Run
"aspnet_regiis.exe -i" from a command window. (The .exe is located in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727).
>
Good luck!
>
Regards,
Nils Magnus
>
>
"Gol Yass" <gol_e_yass@.yahoo.comwrote in message
news:eceb8o$9741@.news-dxb.emirates.net.ae...

Quote:

Originally Posted by

>Hi
>>
>I am using Visual Studio 2005 on windows XP professional (with IIS).
>>
>Following the walkthrough provided by help "creating web page for mobile
>devices" , I have created a website , but as soon as I carry out the last
>step in creating the website , as the website is being loaded in the IDE
>, I
>get error message "Configuring web site
>http//localhost/DeviceWalkthrough
>to ASP .NET 2.0 failed. You may need to manually configure this site for
>ASP
>.NET 2.0 in order for you site to run correctly ".
>>
>Could you please tell me how can I manually configure the site ?
>>
>>
>Thank you.
>>
>>


>
>


i am not able to configure http://localhost:8090/MyWeb to ASP.NET 2

From http://www.google.co.in/search?hl=e...NET+2.0?&meta=
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
How did you try to configure it ?

Did you create a "web site" ?
( not an application, but a *web site* which is pointed to port 8090 ? )

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"srinivas rao nandikanti" <sri_nandi@.rediffmail.comwrote in message
news:cb38adf8-033c-4bf3-9a78-d365a24dda36@.developmentnow.com...

Quote:

Originally Posted by

>i am not able to configure http://localhost:8090/MyWeb to ASP.NET 2
>
From
http://www.google.co.in/search?hl=e...NET+2.0?&meta=
>
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com


Hello srinivas,

Moreover, what do u want to configurate?
Have u read this http://blogs.msdn.com/david.wang/ar...de-by-Side.aspx
?

--
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

sri am not able to configure http://localhost:8090/MyWeb to ASP.NET 2
sr>
srFrom
srhttp://www.google.co.in/search?hl=e...y+configure+web
sr+site+http://localhost/--+to+ASP.NET+2.0?&meta=
sr>
srPosted via DevelopmentNow.com Groups
srhttp://www.developmentnow.com

Manually Configure site for ASP .NET 2

i am not able to configure http://localhost:8090/MyWeb to ASP.NET 2
From http://www.google.co.in/search?hl=e...NET+2.0?&meta=
Posted via DevelopmentNow.com Groups
http://www.developmentnow.comHow did you try to configure it ?
Did you create a "web site" ?
( not an application, but a *web site* which is pointed to port 8090 ? )
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"srinivas rao nandikanti" <sri_nandi@.rediffmail.com> wrote in message
news:cb38adf8-033c-4bf3-9a78-d365a24dda36@.developmentnow.com...
>i am not able to configure http://localhost:8090/MyWeb to ASP.NET 2
> From
> http://www.google.co.in/search?hl=e...NET+2.0?&meta=
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
Hello srinivas,
Moreover, what do u want to configurate?
Have u read this http://blogs.msdn.com/david.wang/ar...de-by-Side.aspx
?
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
sr> i am not able to configure http://localhost:8090/MyWeb to ASP.NET 2
sr>
sr> From
sr> http://www.google.co.in/search?hl=e...y+configure+web
sr> +site+http://localhost/--+to+ASP.NET+2.0?&meta=
sr>
sr> Posted via DevelopmentNow.com Groups
sr> http://www.developmentnow.com

manually closing DB connections...required?

We're running into a problem on our new site. Once a week or so, our site
goes down with an 'out of memory error'. Rebooting the web server fixes
things. Googling the error doesn't return many results (one, actually) and
the suggested fix is to make sure you are manually closing all DB
connections. I'm doing that now, but I had thought that asp.net had fairly
robust automated cleanup, and that having to explicitely close every
connection wasn't necessarily needed (though I certainly agree that it's
good practice). Just curious as to what .net's clean-up capabilities
actually are.

-DarrelHi darrel,

It's not a matter of .Net's cleanup capabilities. It's a matter of the
nature of database connections in .Net. What I mean is that it has nothing
to do with global .Net operations, such as garbage collection. It is
specific to database connections, due to their nature. You will find the
same type of thing with .Net classes that open and close files, and use
unmanaged resources "under the hood". For example, if you open a file, you
had better close it, or it will become unusable (until the next reboot).
Why? Because that's how the file system works. It locks files when they are
opened, and unlocks them when they are closed. A database connection is
similar, in that, you can open it and it will remain open (and in memory)
until you close it. While the connection at your end may be unused when
you're finished using it, it is still connected to the database at the other
end. Closing it disconnects it, allowing it to be cleaned up.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"darrel" <notreal@.hotmail.com> wrote in message
news:u0p0MNisEHA.2660@.TK2MSFTNGP12.phx.gbl...
> We're running into a problem on our new site. Once a week or so, our site
> goes down with an 'out of memory error'. Rebooting the web server fixes
> things. Googling the error doesn't return many results (one, actually) and
> the suggested fix is to make sure you are manually closing all DB
> connections. I'm doing that now, but I had thought that asp.net had fairly
> robust automated cleanup, and that having to explicitely close every
> connection wasn't necessarily needed (though I certainly agree that it's
> good practice). Just curious as to what .net's clean-up capabilities
> actually are.
> -Darrel
> While the connection at your end may be unused when
> you're finished using it, it is still connected to the database at the
other
> end. Closing it disconnects it, allowing it to be cleaned up.

While we're on this topic...is there a log anywhere or any way to see the
current open DB connections?

-Darrel
> While the connection at your end may be unused when
> you're finished using it, it is still connected to the database at the
other
> end. Closing it disconnects it, allowing it to be cleaned up.

Yikes! Wow...we screwed this one up, then. ;o)

Ok, I'm halfway through closing all our connections. This is definitely the
problem (and our fault). Thanks for clarifying that for me!

-Darrel
Oh...one more question...what is the '= nothing' for, and is that something
I should have as well?

For instance, I had:

objConnect.open()

I am now adding:
objConnect.close()

but should I also add:

objConnect = nothing

-Darrel
Hi Darrel,

The following .Net SDK article should be helpful. Along with describing
Connection Pooling, it provides several performanc counters that you can use
to view Connections:

http://msdn.microsoft.com/library/d...aProvider. asp

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"darrel" <notreal@.hotmail.com> wrote in message
news:#R9UzyisEHA.2800@.tk2msftngp13.phx.gbl...
> > While the connection at your end may be unused when
> > you're finished using it, it is still connected to the database at the
> other
> > end. Closing it disconnects it, allowing it to be cleaned up.
> While we're on this topic...is there a log anywhere or any way to see the
> current open DB connections?
> -Darrel
Hi Darrel,

No, that' s not necessary.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"darrel" <notreal@.hotmail.com> wrote in message
news:OdEqh1isEHA.624@.TK2MSFTNGP09.phx.gbl...
> Oh...one more question...what is the '= nothing' for, and is that
something
> I should have as well?
> For instance, I had:
> objConnect.open()
> I am now adding:
> objConnect.close()
> but should I also add:
> objConnect = nothing
> -Darrel
> Hi Darrel,
> No, that' s not necessary.

Thanks, Kevin!

-Darrel

manually closing DB connections...required?

We're running into a problem on our new site. Once a w or so, our site
goes down with an 'out of memory error'. Rebooting the web server fixes
things. Googling the error doesn't return many results (one, actually) and
the suggested fix is to make sure you are manually closing all DB
connections. I'm doing that now, but I had thought that asp.net had fairly
robust automated cleanup, and that having to explicitely close every
connection wasn't necessarily needed (though I certainly agree that it's
good practice). Just curious as to what .net's clean-up capabilities
actually are.
-DarrelHi darrel,
It's not a matter of .Net's cleanup capabilities. It's a matter of the
nature of database connections in .Net. What I mean is that it has nothing
to do with global .Net operations, such as garbage collection. It is
specific to database connections, due to their nature. You will find the
same type of thing with .Net classes that open and close files, and use
unmanaged resources "under the hood". For example, if you open a file, you
had better close it, or it will become unusable (until the next reboot).
Why? Because that's how the file system works. It locks files when they are
opened, and unlocks them when they are closed. A database connection is
similar, in that, you can open it and it will remain open (and in memory)
until you close it. While the connection at your end may be unused when
you're finished using it, it is still connected to the database at the other
end. Closing it disconnects it, allowing it to be cleaned up.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"darrel" <notreal@.hotmail.com> wrote in message
news:u0p0MNisEHA.2660@.TK2MSFTNGP12.phx.gbl...
> We're running into a problem on our new site. Once a w or so, our site
> goes down with an 'out of memory error'. Rebooting the web server fixes
> things. Googling the error doesn't return many results (one, actually) and
> the suggested fix is to make sure you are manually closing all DB
> connections. I'm doing that now, but I had thought that asp.net had fairly
> robust automated cleanup, and that having to explicitely close every
> connection wasn't necessarily needed (though I certainly agree that it's
> good practice). Just curious as to what .net's clean-up capabilities
> actually are.
> -Darrel
>
> While the connection at your end may be unused when
> you're finished using it, it is still connected to the database at the
other
> end. Closing it disconnects it, allowing it to be cleaned up.
While we're on this topic...is there a log anywhere or any way to see the
current open DB connections?
-Darrel
> While the connection at your end may be unused when
> you're finished using it, it is still connected to the database at the
other
> end. Closing it disconnects it, allowing it to be cleaned up.
Yikes! Wow...we screwed this one up, then. ;o)
Ok, I'm halfway through closing all our connections. This is definitely the
problem (and our fault). Thanks for clarifying that for me!
-Darrel
Oh...one more question...what is the '= nothing' for, and is that something
I should have as well?
For instance, I had:
objConnect.open()
I am now adding:
objConnect.close()
but should I also add:
objConnect = nothing
-Darrel
Hi Darrel,
The following .Net SDK article should be helpful. Along with describing
Connection Pooling, it provides several performanc counters that you can use
to view Connections:
http://msdn.microsoft.com/library/d...br />
vider.asp
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"darrel" <notreal@.hotmail.com> wrote in message
news:#R9UzyisEHA.2800@.tk2msftngp13.phx.gbl...
> other
> While we're on this topic...is there a log anywhere or any way to see the
> current open DB connections?
> -Darrel
>
Hi Darrel,
No, that' s not necessary.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"darrel" <notreal@.hotmail.com> wrote in message
news:OdEqh1isEHA.624@.TK2MSFTNGP09.phx.gbl...
> Oh...one more question...what is the '= nothing' for, and is that
something
> I should have as well?
> For instance, I had:
> objConnect.open()
> I am now adding:
> objConnect.close()
> but should I also add:
> objConnect = nothing
> -Darrel
>
> Hi Darrel,
> No, that' s not necessary.
Thanks, Kevin!
-Darrel

Manually Clear Session Object and State Server

We are using State Server to host our session objects.

We have several applications running under IIS that will be using the State
Server.

How can one of those applications clear its Session state? If it was in
process, we could just stop and start the web app. We can not just stop and
start the State Server service because it would wipe out state for all
applications.

Thanks,
fmHi Fm,

Thanks for your posting. As for the problem you mentioned, I think there is
no buildin means for managea certain single application's session state
since the state server is run as a windows service on the server and
haven't any particular managment interface. But you may try modifying the
asp.net application's web.config to change the sessionstate mode to see
wheher this can make the stateserver session invalidated. For example,
change the Session Mode to InProc and run the applicaiton, then change it
back to StateServer Mode.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Hi Steven,

I have tried tried that in the past and I just reconfirmed it that switching
the session from InProc and back to StateServer restores the values sitting
in StateServer.

A hack I tried is setting the Timeout to 1 minute. But the session has to be
idle for the original 20 minutes before this new timeout takes affect.

Quite frustrating. Seems like an even bigger hack will be required like
having an administrator drop an include file on the server that each request
will check to see if it should call Session.RemoveAll or something.

Hopefully ASP.NET and IIS6 will be more robust then the current ASP IIS5
solution for the development team that requested this requirement so they
won't need it.

Thanks,
fm

"Steven Cheng[MSFT]" wrote:

> Hi Fm,
> Thanks for your posting. As for the problem you mentioned, I think there is
> no buildin means for managea certain single application's session state
> since the state server is run as a windows service on the server and
> haven't any particular managment interface. But you may try modifying the
> asp.net application's web.config to change the sessionstate mode to see
> wheher this can make the stateserver session invalidated. For example,
> change the Session Mode to InProc and run the applicaiton, then change it
> back to StateServer Mode.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Hi Steven,

Another that came to me, can more then one instance of State Server run on a
server?

Thanks,
Fm

"Steven Cheng[MSFT]" wrote:

> Hi Fm,
> Thanks for your posting. As for the problem you mentioned, I think there is
> no buildin means for managea certain single application's session state
> since the state server is run as a windows service on the server and
> haven't any particular managment interface. But you may try modifying the
> asp.net application's web.config to change the sessionstate mode to see
> wheher this can make the stateserver session invalidated. For example,
> change the Session Mode to InProc and run the applicaiton, then change it
> back to StateServer Mode.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Hi Fm,

AS for instance of StateServer, I think only one is existing on a
StateServer machine because the asp.net statserver is run as a windows
service, you can find it in the server's service list. Thanks.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)