Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Saturday, March 31, 2012

Trim to a specific alphanumeric quotable

HI all,

I am using c# and I am trying to use the windows authentication to recognize the users.
(User.Identity.Name)

Unfortunately, the users will belong to different domains and there fore their identity will look different. i.e. domain\username or net\username.

How can I remove everything before the username including the backslash?

thank you in advance,

GorginioHave you looked into substring??

// psuedo code

userName = User.Identity.Name.SubString(User.Identity.Name.IndexOf("\"));

That may or may not work.
Welcome to the ASP.NET forums, Gorginio.

You can use the following code:

 // get the username ... but I'll fake it here
string fullUsername = @."domain\username";

// trim away any domain that may form part of the username
string trimmedUsername;
int indexOfSlash = fullUsername.IndexOf( @."\" );
if (indexOfSlash > -1)
{
trimmedUsername = fullUsername.Substring( indexOfSlash + 1, fullUsername.Length - indexOfSlash - 1 );
}
else
{
trimmedUsername = fullUsername;
}

I hope this helps.

Wednesday, March 28, 2012

Trouble connecting to AS/400 with ASP.NET

Hello,

I am writing an ASP.NET application and trying to connect to an as400
using an ADODB connection. I recently completed a Windows application
that connects to the 400. My code works in the Windows world, so
theoretically, it should work for the ASP application as well. But it
doesn't. I keep getting the error CWBSY1006 - User ID is Invalid. I'm
using my Windows login information to automatically log into the 400,
so a userid and password is not required. It does work, however, if I
hard code my userid and password into the connection string. The
only problem with that is that the users need to log in with their
information for security purposes. Here is my code. Any ideas would
be greatly appreciated.

Thanks,
Amaryllis

AS400.Define("MyAS400")
AS400.Connect(cwbx.cwbcoServiceEnum.cwbcoServiceDa taQueues)
conn400 = New ADODB.Connection
conn400.ConnectionString = "Provider=IBMDA400.DataSource.1;" & _
"Data source=MyAS400"
conn400.Open()That is because ASP.NET runs under the ASPNET account. It does not run
under you. So of course, the ASPNET account does not have integrated
security access to your database.

You neither need to give that account rights to the database, or use a
username/password to log in.

"Amaryllis" <amy_hankins@.swn-dot-com.no-spam.invalid> wrote in message
news:410fe1bf$1_5@.Usenet.com...
> Hello,
> I am writing an ASP.NET application and trying to connect to an as400
> using an ADODB connection. I recently completed a Windows application
> that connects to the 400. My code works in the Windows world, so
> theoretically, it should work for the ASP application as well. But it
> doesn't. I keep getting the error CWBSY1006 - User ID is Invalid. I'm
> using my Windows login information to automatically log into the 400,
> so a userid and password is not required. It does work, however, if I
> hard code my userid and password into the connection string. The
> only problem with that is that the users need to log in with their
> information for security purposes. Here is my code. Any ideas would
> be greatly appreciated.
> Thanks,
> Amaryllis
> AS400.Define("MyAS400")
> AS400.Connect(cwbx.cwbcoServiceEnum.cwbcoServiceDa taQueues)
> conn400 = New ADODB.Connection
> conn400.ConnectionString = "Provider=IBMDA400.DataSource.1;" & _
> "Data source=MyAS400"
> conn400.Open()
I agree, but when you add <impersonate=TRUE /> to the web.config
file, it should pick up your information and use it rather than the
ASPNET account information. I've always been able to connect to SQL
Server using that approach. I'm just not sure what is different
about DB2 on the AS/400.

Amaryllis

Trouble connecting to AS/400 with ASP.NET

Hello,
I am writing an ASP.NET application and trying to connect to an as400
using an ADODB connection. I recently completed a Windows application
that connects to the 400. My code works in the Windows world, so
theoretically, it should work for the ASP application as well. But it
doesn't. I keep getting the error CWBSY1006 - User ID is Invalid. I'm
using my Windows login information to automatically log into the 400,
so a userid and password is not required. It does work, however, if I
hard code my userid and password into the connection string. The
only problem with that is that the users need to log in with their
information for security purposes. Here is my code. Any ideas would
be greatly appreciated.
Thanks,
Amaryllis
AS400.Define("MyAS400")
AS400.Connect(cwbx.cwbcoServiceEnum.cwbcoServiceDataQueues)
conn400 = New ADODB.Connection
conn400.ConnectionString = "Provider=IBMDA400.DataSource.1;" & _
"Data source=MyAS400"
conn400.Open()That is because ASP.NET runs under the ASPNET account. It does not run
under you. So of course, the ASPNET account does not have integrated
security access to your database.
You neither need to give that account rights to the database, or use a
username/password to log in.
"Amaryllis" <amy_hankins@.swn-dot-com.no-spam.invalid> wrote in message
news:410fe1bf$1_5@.mcse.ms...
> Hello,
> I am writing an ASP.NET application and trying to connect to an as400
> using an ADODB connection. I recently completed a Windows application
> that connects to the 400. My code works in the Windows world, so
> theoretically, it should work for the ASP application as well. But it
> doesn't. I keep getting the error CWBSY1006 - User ID is Invalid. I'm
> using my Windows login information to automatically log into the 400,
> so a userid and password is not required. It does work, however, if I
> hard code my userid and password into the connection string. The
> only problem with that is that the users need to log in with their
> information for security purposes. Here is my code. Any ideas would
> be greatly appreciated.
> Thanks,
> Amaryllis
> AS400.Define("MyAS400")
> AS400.Connect(cwbx.cwbcoServiceEnum.cwbcoServiceDataQueues)
> conn400 = New ADODB.Connection
> conn400.ConnectionString = "Provider=IBMDA400.DataSource.1;" & _
> "Data source=MyAS400"
> conn400.Open()
>
I agree, but when you add <impersonate=TRUE /> to the web.config
file, it should pick up your information and use it rather than the
ASPNET account information. I've always been able to connect to SQL
Server using that approach. I'm just not sure what is different
about DB2 on the AS/400.
Amaryllis

Trouble deploying an ASP.NET project that uses a SERVICE

Hi Group,
Please help ending my Nightmare! There's a Windows Service written in
VC++ and I have an ASP.NET project that uses this sevice as a COM
library. It just works fine in VS Internal Web Server and also in my
IIS. I can publish it on my computer easily, But CAN'T publish or
deploy it on other machines with almost same configuration. The Service
in working on all other machines too.
I've tried several ways to set all permissions and security rights to
all users and tried to put that service within the BIN directory but it
doesn't help. The Error message that I get in all situatuions is:
Retrieving the COM class factory for component with CLSID
{3304F12E-4A78-4F49-AF4E-C6E92617249E} failed due to the following
error: 80070005.
Please Help!
AfsharAre you sure the said Windows Service was installed and running (if set to
Automatically Start), either somehow by your publishing/deploying, or
someone did it manually, on the target web server computer? How did you get
the Windows Service installed and running?
"Afshar" <afshar.mohebbi@.gmail.com> wrote in message
news:1149922296.293862.140600@.m38g2000cwc.googlegroups.com...
> Hi Group,
> Please help ending my Nightmare! There's a Windows Service written in
> VC++ and I have an ASP.NET project that uses this sevice as a COM
> library. It just works fine in VS Internal Web Server and also in my
> IIS. I can publish it on my computer easily, But CAN'T publish or
> deploy it on other machines with almost same configuration. The Service
> in working on all other machines too.
> I've tried several ways to set all permissions and security rights to
> all users and tried to put that service within the BIN directory but it
> doesn't help. The Error message that I get in all situatuions is:
> Retrieving the COM class factory for component with CLSID
> {3304F12E-4A78-4F49-AF4E-C6E92617249E} failed due to the following
> error: 80070005.
> Please Help!
> Afshar
>
Dear Norman,
I've found the problem, that Service wasn't the problem It was working
and configured fine.
I enabled anonymous access in IIS and set an ASPNET user for it.
Granted administrative rights to ASPNET user and everything went OK!
Thanks for your help,
Afshar
If the project is not used only for test purpose, I strongly suggest you to
consider the security risk of that practice: just having to use that Windows
service, you have lift a web user's priviledge to Administator, that is
definitely not a good way.
"Afshar" <afshar.mohebbi@.gmail.com> wrote in message
news:1150006633.536650.156090@.h76g2000cwa.googlegroups.com...
> Dear Norman,
> I've found the problem, that Service wasn't the problem It was working
> and configured fine.
> I enabled anonymous access in IIS and set an ASPNET user for it.
> Granted administrative rights to ASPNET user and everything went OK!
> Thanks for your help,
> Afshar
>
But I don't know what rights to grant the anonymous user.
Norman Yuan wrote:
> If the project is not used only for test purpose, I strongly suggest you t
o
> consider the security risk of that practice: just having to use that Windo
ws
> service, you have lift a web user's priviledge to Administator, that is
> definitely not a good way.
>
> "Afshar" <afshar.mohebbi@.gmail.com> wrote in message
> news:1150006633.536650.156090@.h76g2000cwa.googlegroups.com...
re:
> But I don't know what rights to grant the anonymous user.
Please review this article :
http://msdn.microsoft.com/library/d... />
000009.asp
for instructions on how to create a service account for ASP.NET
and this article :
http://msdn.microsoft.com/library/d.../>
netht01.asp
for the list of directories to which the ASP.NET service account needs permi
ssions.
This last article is written for 1.1, but the directories haven't changed fo
r 2.0
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Afshar" <afshar.mohebbi@.gmail.com> wrote in message
news:1150372901.156090.26710@.y41g2000cwy.googlegroups.com...
> But I don't know what rights to grant the anonymous user.
>
> Norman Yuan wrote:
>
Dear Juan
The first article is compeltely about Windows 2003 and the Second seems
to not be very realted with Services problem. I'm using Windows XP Pro,
ASP.NET 2.
Thanks:
Afshar Mohebbi
Juan T. Llibre wrote:
> re:
> Please review this article :
> http://msdn.microsoft.com/library/d...y/en-us/dnpag2=
/html/paght000009.asp
> for instructions on how to create a service account for ASP.NET
> and this article :
> http://msdn.microsoft.com/library/d...y/en-us/dnnets=
ec/html/secnetht01.asp
> for the list of directories to which the ASP.NET service account needs pe=
rmissions.
> This last article is written for 1.1, but the directories haven't changed=
for 2.0
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espa=F1ol : http://asp.net.do/foros/
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D[color=
darkred]
> "Afshar" <afshar.mohebbi@.gmail.com> wrote in message
> news:1150372901.156090.26710@.y41g2000cwy.googlegroups.com...
ou to
indows
ng
re:
> The first article is compeltely about Windows 2003
Actually, it's about ASP.NET 2.0 running under Windows 2003 Server.
The only difference you'll find is in the Application Pool info.
You can ignore that. The rest is quite accurate for IIS 5.1.
re:
> the Second seems to not be very realted with Services problem.
The first article deals with ASP.NET 2.0 and the second one with ASP.NET 1.1
.
You can ignore the second one, but it has the correct list of directories to
which
you need to assign permissions to whichever account ASP.NET runs as.
The first article doesn't have them, because ASP.NET 2.0 has a nifty
command to assign permissions to all necessary directories :
aspnet_regiis -GA machinename\accountname
or
aspnet_regiis -GA domainname\accountname
re:
> I'm using Windows XP Pro, ASP.NET 2.
> I enabled anonymous access in IIS and set an ASPNET user for it.
OK...
re:
> Granted administrative rights to ASPNET user and everything went OK!
That may bite you in the future.
The ASPNET account should *not* have administrative rights.
What you should do is to *only* assign the rights the account needs.
The list of directories and the type of permissions the ASP.NET
account needs are listed in the second article I sent to you.
If you still have doubts, review this list of ACLS which ASP.NET (all versio
ns) requires :
http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx
If you assign those permissions to *any* account which ASP.NET is running as
,
ASP.NET will run just fine, including Web Services.
Don't expose your machine by giving administrative rights to the ASP.NET acc
ount.
That is easy to do, and does solve the problem, but it may bring you headach
es later on.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Afshar" <afshar.mohebbi@.gmail.com> wrote in message
news:1150622522.679335.249860@.r2g2000cwb.googlegroups.com...
Dear Juan
The first article is compeltely about Windows 2003 and the Second seems
to not be very realted with Services problem. I'm using Windows XP Pro,
ASP.NET 2.
Thanks:
Afshar Mohebbi
Juan T. Llibre wrote:
> re:
> Please review this article :
> http://msdn.microsoft.com/library/d...>
ht000009.asp
> for instructions on how to create a service account for ASP.NET
> and this article :
> http://msdn.microsoft.com/library/d...
ecnetht01.asp
> for the list of directories to which the ASP.NET service account needs per
missions.
> This last article is written for 1.1, but the directories haven't changed
for 2.0
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaol : http://asp.net.do/foros/
> ===================================
> "Afshar" <afshar.mohebbi@.gmail.com> wrote in message
> news:1150372901.156090.26710@.y41g2000cwy.googlegroups.com...
Dear Juan,
You're right: ASPNET user shouldn't be Administrator...

> If you still have doubts, review this list of ACLS which ASP.NET (all vers
ions) requires :
> http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx
This list is very helpfull and I've found many things that I didn't
know about it.
Thanks for your attention once again!
Afshar Mohebbi

Trouble deploying an ASP.NET project that uses a SERVICE

Hi Group,

Please help ending my Nightmare! There's a Windows Service written in
VC++ and I have an ASP.NET project that uses this sevice as a COM
library. It just works fine in VS Internal Web Server and also in my
IIS. I can publish it on my computer easily, But CAN'T publish or
deploy it on other machines with almost same configuration. The Service
in working on all other machines too.
I've tried several ways to set all permissions and security rights to
all users and tried to put that service within the BIN directory but it
doesn't help. The Error message that I get in all situatuions is:
Retrieving the COM class factory for component with CLSID
{3304F12E-4A78-4F49-AF4E-C6E92617249E} failed due to the following
error: 80070005.

Please Help!
AfsharAre you sure the said Windows Service was installed and running (if set to
Automatically Start), either somehow by your publishing/deploying, or
someone did it manually, on the target web server computer? How did you get
the Windows Service installed and running?

"Afshar" <afshar.mohebbi@.gmail.com> wrote in message
news:1149922296.293862.140600@.m38g2000cwc.googlegr oups.com...
> Hi Group,
> Please help ending my Nightmare! There's a Windows Service written in
> VC++ and I have an ASP.NET project that uses this sevice as a COM
> library. It just works fine in VS Internal Web Server and also in my
> IIS. I can publish it on my computer easily, But CAN'T publish or
> deploy it on other machines with almost same configuration. The Service
> in working on all other machines too.
> I've tried several ways to set all permissions and security rights to
> all users and tried to put that service within the BIN directory but it
> doesn't help. The Error message that I get in all situatuions is:
> Retrieving the COM class factory for component with CLSID
> {3304F12E-4A78-4F49-AF4E-C6E92617249E} failed due to the following
> error: 80070005.
> Please Help!
> Afshar
Dear Norman,
I've found the problem, that Service wasn't the problem It was working
and configured fine.

I enabled anonymous access in IIS and set an ASPNET user for it.
Granted administrative rights to ASPNET user and everything went OK!

Thanks for your help,
Afshar
If the project is not used only for test purpose, I strongly suggest you to
consider the security risk of that practice: just having to use that Windows
service, you have lift a web user's priviledge to Administator, that is
definitely not a good way.

"Afshar" <afshar.mohebbi@.gmail.com> wrote in message
news:1150006633.536650.156090@.h76g2000cwa.googlegr oups.com...
> Dear Norman,
> I've found the problem, that Service wasn't the problem It was working
> and configured fine.
> I enabled anonymous access in IIS and set an ASPNET user for it.
> Granted administrative rights to ASPNET user and everything went OK!
> Thanks for your help,
> Afshar
But I don't know what rights to grant the anonymous user.

Norman Yuan wrote:
> If the project is not used only for test purpose, I strongly suggest you to
> consider the security risk of that practice: just having to use that Windows
> service, you have lift a web user's priviledge to Administator, that is
> definitely not a good way.
>
> "Afshar" <afshar.mohebbi@.gmail.com> wrote in message
> news:1150006633.536650.156090@.h76g2000cwa.googlegr oups.com...
> > Dear Norman,
> > I've found the problem, that Service wasn't the problem It was working
> > and configured fine.
> > I enabled anonymous access in IIS and set an ASPNET user for it.
> > Granted administrative rights to ASPNET user and everything went OK!
> > Thanks for your help,
> > Afshar
re:
> But I don't know what rights to grant the anonymous user.

Please review this article :

http://msdn.microsoft.com/library/d...paght000009.asp
for instructions on how to create a service account for ASP.NET

and this article :
http://msdn.microsoft.com/library/d.../secnetht01.asp
for the list of directories to which the ASP.NET service account needs permissions.

This last article is written for 1.1, but the directories haven't changed for 2.0

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Afshar" <afshar.mohebbi@.gmail.com> wrote in message
news:1150372901.156090.26710@.y41g2000cwy.googlegro ups.com...
> But I don't know what rights to grant the anonymous user.
>
> Norman Yuan wrote:
>> If the project is not used only for test purpose, I strongly suggest you to
>> consider the security risk of that practice: just having to use that Windows
>> service, you have lift a web user's priviledge to Administator, that is
>> definitely not a good way.
>>
>>
>> "Afshar" <afshar.mohebbi@.gmail.com> wrote in message
>> news:1150006633.536650.156090@.h76g2000cwa.googlegr oups.com...
>> > Dear Norman,
>> > I've found the problem, that Service wasn't the problem It was working
>> > and configured fine.
>>> > I enabled anonymous access in IIS and set an ASPNET user for it.
>> > Granted administrative rights to ASPNET user and everything went OK!
>>> > Thanks for your help,
>> > Afshar
>
Dear Juan
The first article is compeltely about Windows 2003 and the Second seems
to not be very realted with Services problem. I'm using Windows XP Pro,
ASP.NET 2.

Thanks:
Afshar Mohebbi

Juan T. Llibre wrote:
> re:
> > But I don't know what rights to grant the anonymous user.
> Please review this article :
> http://msdn.microsoft.com/library/d...paght000009.asp
> for instructions on how to create a service account for ASP.NET
> and this article :
> http://msdn.microsoft.com/library/d.../secnetht01.asp
> for the list of directories to which the ASP.NET service account needs permissions.
> This last article is written for 1.1, but the directories haven't changedfor 2.0
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaol : http://asp.net.do/foros/
> ===================================
> "Afshar" <afshar.mohebbi@.gmail.com> wrote in message
> news:1150372901.156090.26710@.y41g2000cwy.googlegro ups.com...
> > But I don't know what rights to grant the anonymous user.
> > Norman Yuan wrote:
> >> If the project is not used only for test purpose, I strongly suggest you to
> >> consider the security risk of that practice: just having to use that Windows
> >> service, you have lift a web user's priviledge to Administator, that is
> >> definitely not a good way.
> >>
> >>
> >> "Afshar" <afshar.mohebbi@.gmail.com> wrote in message
> >> news:1150006633.536650.156090@.h76g2000cwa.googlegr oups.com...
> >> > Dear Norman,
> >> > I've found the problem, that Service wasn't the problem It was working
> >> > and configured fine.
> >> >> > I enabled anonymous access in IIS and set an ASPNET user for it.
> >> > Granted administrative rights to ASPNET user and everything went OK!
> >> >> > Thanks for your help,
> >> > Afshar
> >
re:
> The first article is compeltely about Windows 2003

Actually, it's about ASP.NET 2.0 running under Windows 2003 Server.

The only difference you'll find is in the Application Pool info.
You can ignore that. The rest is quite accurate for IIS 5.1.

re:
> the Second seems to not be very realted with Services problem.

The first article deals with ASP.NET 2.0 and the second one with ASP.NET 1.1.

You can ignore the second one, but it has the correct list of directories to which
you need to assign permissions to whichever account ASP.NET runs as.

The first article doesn't have them, because ASP.NET 2.0 has a nifty
command to assign permissions to all necessary directories :

aspnet_regiis -GA machinename\accountname
or
aspnet_regiis -GA domainname\accountname

re:
> I'm using Windows XP Pro, ASP.NET 2.
> I enabled anonymous access in IIS and set an ASPNET user for it.

OK...

re:
> Granted administrative rights to ASPNET user and everything went OK!

That may bite you in the future.
The ASPNET account should *not* have administrative rights.

What you should do is to *only* assign the rights the account needs.

The list of directories and the type of permissions the ASP.NET
account needs are listed in the second article I sent to you.

If you still have doubts, review this list of ACLS which ASP.NET (all versions) requires :
http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx

If you assign those permissions to *any* account which ASP.NET is running as,
ASP.NET will run just fine, including Web Services.

Don't expose your machine by giving administrative rights to the ASP.NET account.
That is easy to do, and does solve the problem, but it may bring you headaches later on.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Afshar" <afshar.mohebbi@.gmail.com> wrote in message
news:1150622522.679335.249860@.r2g2000cwb.googlegro ups.com...
Dear Juan
The first article is compeltely about Windows 2003 and the Second seems
to not be very realted with Services problem. I'm using Windows XP Pro,
ASP.NET 2.

Thanks:
Afshar Mohebbi

Juan T. Llibre wrote:
> re:
> > But I don't know what rights to grant the anonymous user.
> Please review this article :
> http://msdn.microsoft.com/library/d...paght000009.asp
> for instructions on how to create a service account for ASP.NET
> and this article :
> http://msdn.microsoft.com/library/d.../secnetht01.asp
> for the list of directories to which the ASP.NET service account needs permissions.
> This last article is written for 1.1, but the directories haven't changed for 2.0
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaol : http://asp.net.do/foros/
> ===================================
> "Afshar" <afshar.mohebbi@.gmail.com> wrote in message
> news:1150372901.156090.26710@.y41g2000cwy.googlegro ups.com...
> > But I don't know what rights to grant the anonymous user.
> > Norman Yuan wrote:
> >> If the project is not used only for test purpose, I strongly suggest you to
> >> consider the security risk of that practice: just having to use that Windows
> >> service, you have lift a web user's priviledge to Administator, that is
> >> definitely not a good way.
> >>
> >>
> >> "Afshar" <afshar.mohebbi@.gmail.com> wrote in message
> >> news:1150006633.536650.156090@.h76g2000cwa.googlegr oups.com...
> >> > Dear Norman,
> >> > I've found the problem, that Service wasn't the problem It was working
> >> > and configured fine.
> >> >> > I enabled anonymous access in IIS and set an ASPNET user for it.
> >> > Granted administrative rights to ASPNET user and everything went OK!
> >> >> > Thanks for your help,
> >> > Afshar
> >
Dear Juan,

You're right: ASPNET user shouldn't be Administrator...

> If you still have doubts, review this list of ACLS which ASP.NET (all versions) requires :
> http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx
This list is very helpfull and I've found many things that I didn't
know about it.

Thanks for your attention once again!
Afshar Mohebbi

Saturday, March 24, 2012

Trouble with ASP.NET trust levels on IIS 6.0

I just upgraded my Win2k Server machine to Windows 2003 Server and IIS 6. Everything worked fine. I then installed Windows Sharepoint Services and now none of my apps will run, some throw an ASP.NET error that says "Debugging is not supported under current trust level settings" and some can't be found by the browser at all. Any ideas on what could be going on? After the upgrade IIS was running in IIS 5 Isolation mode, but Sharepoint Services made me uncheck that. Now I can't get anything to work except sharepoint and I am getting frustrated. Any ideas? Thanks!

-JoshWindows Sharepoint Services and regular ASP.NET cannot coexist on the same web site. They can be on the same server, but you have to have separate sites for them. Two different virtual directories won't do, they actually have to be on different sites.

The reason you get this specific error is that WSS switches its site to a reduced trust level for ASP.NET. At this level, debugging is not supported.

There are other things WSS does as well, which won't play well with your site. WSS removes a lot of the modules typically used in an ASP.NET app, like session state, and also installs a filter that may rewrite your site's URLs (because, in WSS, most pages actually come from the database rather than from the filesystem).
Thank you so much for you answer! It was driving me crazy, because each time I uninstalled/re-installed WSS my website would work/stop working. I wonder if that is in the readme? Very good to know!
Thank you so much as well! I had the same problem!

The trouble is, the code I am going to develop I want to use it on the sharepoint site (via web part)... this limitation just makes the development more difficult.

Thursday, March 22, 2012

Trouble with File Paths

Hi,

On my development machine I am using VB/ASP .net 2.0, IIS 5.1 , Windows XP Pro. The test server has Windows Server 2003, IIS 6.0.

I am trying to access my config settings located in an .xml file I created (SQLMessageSettings.xml).
The physical location is: C:\VB.Net 2.0 Projects\SQLMessageViewer\SQLMessageViewer\SQLMessageSettings.xml

When I run the application it runs from IIS (not VS Development Server) as a virtual IIS application.

I thought that to access the "SQLMessageSettings.xml" file I can use the file path "/SQLMessageViewer/SQLMessageSettings.xml" and it would start at the root of my website and find the file.
Instead I get an error "Could not find a part of the path 'C:\SQLMessageViewer\SQLMessageSettings.xml'."
If I remove the initial "/" the error is "Could not find a part of the path 'C:\WINDOWS\system32\SQLMessageViewer\SQLMessageSettings.xml'."
The only way it works is if I put the entire file path in (C:\VB.Net 2.0 Projects\SQLMessageViewer\SQLMessageViewer\SQLMessageSettings.xml).

When I changed the app to run from the VS Development Server it worked with only "SQLMessageViewer/SQLMessageSettings.xml"

I know I am missing something here. Part of the problem is that I don't fully understand all the architechture of IIS as to how a Website, Virtual Application and Virtual Directory all relate to each other.

How can set it up so I don't have to put the entire physical file path?
Would the tilde, "~", help me in anyway?
Also is there a way to do it so that I won't have to change the file path reference when I move it to the test server even though the physical location of the files are different?

Thank You,

Oran

As far as I know, you always have to use the full path to access a file on the server using the filesystem object. But, you can MAP the path from your current app. I think this should work

Dim FilePath as string = Server.MapPath("./SQLMessageViewer/SQLMessageSettings.xml")


Hi,

I think ~ should help you to solve the problem. ~ points to the root folder of your web application and then you can specify the path as you require.

Hope this helps to solve the problem

Good LuckYes

Regards

Vineed


Thanks for the suggestion but when I tried the "~",

"~/SQLMessageViewer/SQLMessageSettings.xml"

I got this:

Could not find a part of the path 'C:\VB.Net 2.0 Projects\SQLMessageViewer\~\SQLMessageViewer\SQLMessageSettings.xml'.

That is the right file path except for the "~."

I decided to get rid of the extra "SQLMessageViewer" folder and put everything where the .sln file is and it didn't help.

I tried this:

"~/SQLMessageSettings.xml"

and got this:

Could not find a part of the path 'C:\WINDOWS\system32\~\SQLMessageSettings.xml'.

Thanks,

Oran


Hi Oran,

Try usingRequest.ApplicationPath. This property returns the Virtual path of the Web applications Root folder. To this path you can add the path of your file as required. If you are not comfortable using the Virtual Path then you can also try using theRequest.PhysicalApplicationPath. This would return the Physical Path of the Web Application's root folder. You can again add the path of the file as required.

Hope this helps to solve your problem

Good LuckYes

Regards

Vineed


Try this

Server.MapPath("~/SQLMessageViewer/SQLMessageSettings.xml")

Assumption is that SQLMessageViewer is a folder inside your website


Hi,

My team has built a configuration component based on the provider model allowing the developer to store the config settings wherever he wants (database, .config file, .xml file ...). The component is a class library compiled to a dll (CommonConfig.dll). The dll is meant to serve both windows apps and web apps. The code in the commonconfig.dll that loads the xml file looks like this:

xd =New XmlDocument()
xd.Load(MyBase.Location)

The location (file path, database connection) of the config settings is stored in the web.config (or app.config) file like this:

<ConfigSettingslocation="~/SQLMessageSettings.xml"type="Common.Config.CommonConfig.XmlCommonConfigProvider"/>

Does "server.mappath" work in a windows app? Is it only a matter of importing the right namespace (which one?)? We can make 2 versions of the CommonConfig.dll one for web and one for windows, but we would like to avoid that if possible.

I was hoping that there was a way to locate the file with only the file path (and without having to write out the entire path). It could be there is no better solution, but it is strange that when I changed the app to run from the VS Development Server it worked fine with "SQLMessageViewer/SQLMessageSettings.xml" (See original post).

Thanks,

Oran


System.Web.HttpContext.Current.Server.MapPath is the fully qualified name . Well in your config dll, you can check if the httpContext.Current is empty .. if so then its not a web app so with this check your config dll can decide how to pull the config file


Thanks Jeev! Your solution works for both windows and web (on both servers).

I don't understand why the tilde doesn't work on its own without server.mappath?

Oran

trouble with Forms authentication and new windows opened with java script

Hi,

I have an application using "Forms authentication".
Everything works perfectly well except when I try to open
a new page with java script like the following:

<script language='javascript'>window.open
(myPage.aspx','','Fullscreen=no; Scrollbars=yes;
Menubar=no; Locationbar=no; Resizable=yes; Status=no;')
</script
I now get to see the login page. Does anybody know how to
prevent this behaviour?

Thank you a lot!
Daniel Walzenbach"Daniel Walzenbach" <daniel.walzenbach.NOSPAM@.freudenberg.de> wrote in
message news:5af301c3ad25$534f7fa0$a601280a@.phx.gbl...
> Hi,
> I have an application using "Forms authentication".
> Everything works perfectly well except when I try to open
> a new page with java script like the following:
> <script language='javascript'>window.open
> (myPage.aspx','','Fullscreen=no; Scrollbars=yes;
> Menubar=no; Locationbar=no; Resizable=yes; Status=no;')
> </script>
> I now get to see the login page. Does anybody know how to
> prevent this behaviour?

I haven't tried this myself, but I would think that if the page you're
opening is in the same domain as the site you authenticated to, that there
would be no problem.

The question comes down to whether the authentication cookie is sent to the
server by the second page. If it wasn't sent, it would most likely be
because of different domains. For instance, if you authenticated at
http://area.company.com, and you're trying to open a page at
http://somewhereelse.company.com, it should succeed if the authentication
cookie was in domain "company.com", but not if it was in domain
"area.company.com".

As a diagnostic, put a link to your "myPage.aspx" on the page and click the
link and see what happens.

Also, what browser are you using?
--
John Saunders
John.Saunders at SurfControl.com
2 things...
One... what's the timeout on your session? This could cause this to happen.
I had some thing like this happen with iframes. I would get the login in the
iframe that timedout.

Let me look for the JavaScript that I used to fix it.

"Daniel Walzenbach" <daniel.walzenbach.NOSPAM@.freudenberg.de> wrote in
message news:5af301c3ad25$534f7fa0$a601280a@.phx.gbl...
> Hi,
> I have an application using "Forms authentication".
> Everything works perfectly well except when I try to open
> a new page with java script like the following:
> <script language='javascript'>window.open
> (myPage.aspx','','Fullscreen=no; Scrollbars=yes;
> Menubar=no; Locationbar=no; Resizable=yes; Status=no;')
> </script>
> I now get to see the login page. Does anybody know how to
> prevent this behaviour?
> Thank you a lot!
> Daniel Walzenbach
here is the Java script...

In the .aspx add at the beginning of the page (somewhere in the header)
<%If Request("var") <> "" Then%>
<script language="javascript">
top.location.href = 'login.aspx';
</script>
<%End If%
What this does is check the session var "var" if it is not set (session time
out) it will load the login screen in the top frame. you might have to
change it to parent.location.href or something down that line...

"Daniel Walzenbach" <daniel.walzenbach.NOSPAM@.freudenberg.de> wrote in
message news:5af301c3ad25$534f7fa0$a601280a@.phx.gbl...
> Hi,
> I have an application using "Forms authentication".
> Everything works perfectly well except when I try to open
> a new page with java script like the following:
> <script language='javascript'>window.open
> (myPage.aspx','','Fullscreen=no; Scrollbars=yes;
> Menubar=no; Locationbar=no; Resizable=yes; Status=no;')
> </script>
> I now get to see the login page. Does anybody know how to
> prevent this behaviour?
> Thank you a lot!
> Daniel Walzenbach
Thank you John and George,

Unfortunately neither of your assumptions is right. I don't navigate across
domain borders neither should my session be timed out. It is not that it
happens once in a while but ever. The page I open using Java Script is
located in a sub-directory of the same application. I am using Microsoft IE
6 SP1.

Any other suggestions? If you want I can assemble a small project containing
the two pages and up it here.

Greetings

Daniel Walzenbach

"george d lake" <gerogevyp@.cuartel15.com> schrieb im Newsbeitrag
news:O68XqEUrDHA.3844@.tk2msftngp13.phx.gbl...
> here is the Java script...
>
> In the .aspx add at the beginning of the page (somewhere in the header)
> <%If Request("var") <> "" Then%>
> <script language="javascript">
> top.location.href = 'login.aspx';
> </script>
> <%End If%>
>
> What this does is check the session var "var" if it is not set (session
time
> out) it will load the login screen in the top frame. you might have to
> change it to parent.location.href or something down that line...
>
> "Daniel Walzenbach" <daniel.walzenbach.NOSPAM@.freudenberg.de> wrote in
> message news:5af301c3ad25$534f7fa0$a601280a@.phx.gbl...
> > Hi,
> > I have an application using "Forms authentication".
> > Everything works perfectly well except when I try to open
> > a new page with java script like the following:
> > <script language='javascript'>window.open
> > (myPage.aspx','','Fullscreen=no; Scrollbars=yes;
> > Menubar=no; Locationbar=no; Resizable=yes; Status=no;')
> > </script>
> > I now get to see the login page. Does anybody know how to
> > prevent this behaviour?
> > Thank you a lot!
> > Daniel Walzenbach
Hi Daniel,

Since the "mypage.aspx" is in a sub directory of your web application, is
there also a "web.config" in the sub directory? And, when you perform the
form authentication, did you change any default settings for cookies?

Additionlly, have you checked if a link will work as John suggested?

Luke
Microsoft Online Support

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

Thank you for your help but I solved my problem this afternoon. In fact
George was right. My session was lost. Not due to a timeout but to the fact
that I not even had an HTML file. Mea culpa. I was directly streaming out a
pdf file. I now placed my page in an iFrame and the world is good again.

Thank you everybody for your help!

Daniel

"MSFT" <lukezhan@.online.microsoft.com> schrieb im Newsbeitrag
news:X2ohkLbrDHA.1548@.cpmsftngxa06.phx.gbl...
> Hi Daniel,
> Since the "mypage.aspx" is in a sub directory of your web application, is
> there also a "web.config" in the sub directory? And, when you perform the
> form authentication, did you change any default settings for cookies?
> Additionlly, have you checked if a link will work as John suggested?
> Luke
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)

Trouble with popup windows

I am building an ASP.NET application where I have been required to make all
the editing screens popup windows within the application. I didn't have any
trouble creating the new windows but only about half of them show on top of
the main application when they are created. The window are created in
javascript and I've tried using the top property of the window object but it
still does not work for all my windows and all the windows are created usin
g
the same command. Am I missing something in javascript or is this an issue
with the new Internet Explorer?
This is the code I used to create my popup windows:
'Create a script to bring up the update window
strScript = "<script language='javascript'>"
strScript &=
"window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
" ','AddLog','width=522,height=450,top=100
,left=200,directories=no,location=n
o,menubar=no,scrollbars=no,status=no,too
lbar=no,resizable=no');window.top(0)
;"
strScript &= "</script>"
'Execute the script
RegisterClientScriptBlock("NewEntry", strScript)
Any help would be greatly appreciated.couple of issues.
1) your generating pop's with inline script will not work with popup
blockers (ie xp-sp2).
2) if the popup window already exists, window open will not bring it to the
front, you need to set focus to the window
3) if the popup window has been minimized, you need to close and reopen the
window.
-- bruce (sql;work.com).
"clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
| I am building an ASP.NET application where I have been required to make
all
| the editing screens popup windows within the application. I didn't have
any
| trouble creating the new windows but only about half of them show on top
of
| the main application when they are created. The window are created in
| javascript and I've tried using the top property of the window object but
it
| still does not work for all my windows and all the windows are created
using
| the same command. Am I missing something in javascript or is this an
issue
| with the new Internet Explorer?
|
| This is the code I used to create my popup windows:
|
| 'Create a script to bring up the update window
| strScript = "<script language='javascript'>"
| strScript &=
| "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
| CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
|
" ','AddLog','width=522,height=450,top=100
,left=200,directories=no,location=n
o,menubar=no,scrollbars=no,status=no,too
lbar=no,resizable=no');window.top(0)
;"
| strScript &= "</script>"
|
| 'Execute the script
| RegisterClientScriptBlock("NewEntry", strScript)
|
| Any help would be greatly appreciated.
Thank you for your quick response but I am still having some difficulties.
In response to your sugesstions I already had the popup blocker turned off,
the popup windows are only created when a user clicks a button and are close
d
after use, and the window can not be resized. I tried using the focus metho
d
on the window but still with no luck. For example on one page a user can
open a window to add a new entry to a table or they can open a window to edi
t
an existing entry. If I click the button to edit the entry, no problems the
window opens on top of the application. If I click the button to add an
entry, the new window opens but it is created underneath the application.
Both windows open the same asp.net page and the only difference in the code
are the parameters each one passs. I am very .
Chris
"bruce barker" wrote:

> couple of issues.
> 1) your generating pop's with inline script will not work with popup
> blockers (ie xp-sp2).
> 2) if the popup window already exists, window open will not bring it to th
e
> front, you need to set focus to the window
> 3) if the popup window has been minimized, you need to close and reopen th
e
> window.
> -- bruce (sql;work.com).
>
> "clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
> news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
> | I am building an ASP.NET application where I have been required to make
> all
> | the editing screens popup windows within the application. I didn't have
> any
> | trouble creating the new windows but only about half of them show on top
> of
> | the main application when they are created. The window are created in
> | javascript and I've tried using the top property of the window object bu
t
> it
> | still does not work for all my windows and all the windows are created
> using
> | the same command. Am I missing something in javascript or is this an
> issue
> | with the new Internet Explorer?
> |
> | This is the code I used to create my popup windows:
> |
> | 'Create a script to bring up the update window
> | strScript = "<script language='javascript'>"
> | strScript &=
> | "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
> | CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
> |
> " ','AddLog','width=522,height=450,top=100
,left=200,directories=no,location
=n
> o,menubar=no,scrollbars=no,status=no,too
lbar=no,resizable=no');window.top(
0)
> ;"
> | strScript &= "</script>"
> |
> | 'Execute the script
> | RegisterClientScriptBlock("NewEntry", strScript)
> |
> | Any help would be greatly appreciated.
>
>
Just curious.. Is smartnav enabled in your web.config? I have noticed this
problem when smartnav is enabled.
"clsmith66" wrote:
> Thank you for your quick response but I am still having some difficulties.
> In response to your sugesstions I already had the popup blocker turned off
,
> the popup windows are only created when a user clicks a button and are clo
sed
> after use, and the window can not be resized. I tried using the focus met
hod
> on the window but still with no luck. For example on one page a user can
> open a window to add a new entry to a table or they can open a window to e
dit
> an existing entry. If I click the button to edit the entry, no problems t
he
> window opens on top of the application. If I click the button to add an
> entry, the new window opens but it is created underneath the application.
> Both windows open the same asp.net page and the only difference in the cod
e
> are the parameters each one passs. I am very .
> Chris
> "bruce barker" wrote:
>

Trouble with popup windows

I am building an ASP.NET application where I have been required to make all
the editing screens popup windows within the application. I didn't have any
trouble creating the new windows but only about half of them show on top of
the main application when they are created. The window are created in
javascript and I've tried using the top property of the window object but it
still does not work for all my windows and all the windows are created using
the same command. Am I missing something in javascript or is this an issue
with the new Internet Explorer?

This is the code I used to create my popup windows:

'Create a script to bring up the update window
strScript = "<script language='javascript'>"
strScript &=
"window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
"','AddLog','width=522,height=450,top=100,left=200, directories=no,location=no,menubar=no,scrollbars=n o,status=no,toolbar=no,resizable=no');window.top(0 );"
strScript &= "</script>"

'Execute the script
RegisterClientScriptBlock("NewEntry", strScript)

Any help would be greatly appreciated.couple of issues.

1) your generating pop's with inline script will not work with popup
blockers (ie xp-sp2).
2) if the popup window already exists, window open will not bring it to the
front, you need to set focus to the window
3) if the popup window has been minimized, you need to close and reopen the
window.

-- bruce (sql;work.com).

"clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
| I am building an ASP.NET application where I have been required to make
all
| the editing screens popup windows within the application. I didn't have
any
| trouble creating the new windows but only about half of them show on top
of
| the main application when they are created. The window are created in
| javascript and I've tried using the top property of the window object but
it
| still does not work for all my windows and all the windows are created
using
| the same command. Am I missing something in javascript or is this an
issue
| with the new Internet Explorer?
|
| This is the code I used to create my popup windows:
|
| 'Create a script to bring up the update window
| strScript = "<script language='javascript'>"
| strScript &=
| "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
| CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
|
"','AddLog','width=522,height=450,top=100,left=200, directories=no,location=n
o,menubar=no,scrollbars=no,status=no,toolbar=no,re sizable=no');window.top(0)
;"
| strScript &= "</script>"
|
| 'Execute the script
| RegisterClientScriptBlock("NewEntry", strScript)
|
| Any help would be greatly appreciated.
Thank you for your quick response but I am still having some difficulties.
In response to your sugesstions I already had the popup blocker turned off,
the popup windows are only created when a user clicks a button and are closed
after use, and the window can not be resized. I tried using the focus method
on the window but still with no luck. For example on one page a user can
open a window to add a new entry to a table or they can open a window to edit
an existing entry. If I click the button to edit the entry, no problems the
window opens on top of the application. If I click the button to add an
entry, the new window opens but it is created underneath the application.
Both windows open the same asp.net page and the only difference in the code
are the parameters each one passs. I am very confused.

Chris

"bruce barker" wrote:

> couple of issues.
> 1) your generating pop's with inline script will not work with popup
> blockers (ie xp-sp2).
> 2) if the popup window already exists, window open will not bring it to the
> front, you need to set focus to the window
> 3) if the popup window has been minimized, you need to close and reopen the
> window.
> -- bruce (sql;work.com).
>
> "clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
> news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
> | I am building an ASP.NET application where I have been required to make
> all
> | the editing screens popup windows within the application. I didn't have
> any
> | trouble creating the new windows but only about half of them show on top
> of
> | the main application when they are created. The window are created in
> | javascript and I've tried using the top property of the window object but
> it
> | still does not work for all my windows and all the windows are created
> using
> | the same command. Am I missing something in javascript or is this an
> issue
> | with the new Internet Explorer?
> |
> | This is the code I used to create my popup windows:
> |
> | 'Create a script to bring up the update window
> | strScript = "<script language='javascript'>"
> | strScript &=
> | "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
> | CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
> |
> "','AddLog','width=522,height=450,top=100,left=200, directories=no,location=n
> o,menubar=no,scrollbars=no,status=no,toolbar=no,re sizable=no');window.top(0)
> ;"
> | strScript &= "</script>"
> |
> | 'Execute the script
> | RegisterClientScriptBlock("NewEntry", strScript)
> |
> | Any help would be greatly appreciated.
>
Just curious.. Is smartnav enabled in your web.config? I have noticed this
problem when smartnav is enabled.

"clsmith66" wrote:

> Thank you for your quick response but I am still having some difficulties.
> In response to your sugesstions I already had the popup blocker turned off,
> the popup windows are only created when a user clicks a button and are closed
> after use, and the window can not be resized. I tried using the focus method
> on the window but still with no luck. For example on one page a user can
> open a window to add a new entry to a table or they can open a window to edit
> an existing entry. If I click the button to edit the entry, no problems the
> window opens on top of the application. If I click the button to add an
> entry, the new window opens but it is created underneath the application.
> Both windows open the same asp.net page and the only difference in the code
> are the parameters each one passs. I am very confused.
> Chris
> "bruce barker" wrote:
> > couple of issues.
> > 1) your generating pop's with inline script will not work with popup
> > blockers (ie xp-sp2).
> > 2) if the popup window already exists, window open will not bring it to the
> > front, you need to set focus to the window
> > 3) if the popup window has been minimized, you need to close and reopen the
> > window.
> > -- bruce (sql;work.com).
> > "clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
> > news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
> > | I am building an ASP.NET application where I have been required to make
> > all
> > | the editing screens popup windows within the application. I didn't have
> > any
> > | trouble creating the new windows but only about half of them show on top
> > of
> > | the main application when they are created. The window are created in
> > | javascript and I've tried using the top property of the window object but
> > it
> > | still does not work for all my windows and all the windows are created
> > using
> > | the same command. Am I missing something in javascript or is this an
> > issue
> > | with the new Internet Explorer?
> > |
> > | This is the code I used to create my popup windows:
> > |
> > | 'Create a script to bring up the update window
> > | strScript = "<script language='javascript'>"
> > | strScript &=
> > | "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
> > | CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
> > |
> > "','AddLog','width=522,height=450,top=100,left=200, directories=no,location=n
> > o,menubar=no,scrollbars=no,status=no,toolbar=no,re sizable=no');window.top(0)
> > ;"
> > | strScript &= "</script>"
> > |
> > | 'Execute the script
> > | RegisterClientScriptBlock("NewEntry", strScript)
> > |
> > | Any help would be greatly appreciated.

Tuesday, March 13, 2012

Troubleshooting ASP.Net Application Pools on IIS6

I have several sites running on Windows 2003 Server in true IIS 6 mode
with Application pools. One site has about 9 Virtual Directories in
it that are all configured to run as applications. Each of these have
a dedicated application pool with all different memory settings in the
Memory Recycling area.
The applications are all .Net based applications. They are all pretty
frequently used apps and as a rule of thumb, we assigned more memory
in the app pools to the busier sites and less to the least busy sites.
Here's the deal. Every once in a while, the application will hang up
and not respond. Once I recycle the application, it's fine.
I don't really get a whole lot of info from the developers other than
"The site is hung up" The only thing I see is stuff like this in the
eventlog. This is usually AFTER I recycle the application and it
start working again.
----
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1013
Date: 11/18/2004
Time: 2:37:21 PM
User: N/A
Computer: <server name>
Description:
A process serving application pool <app name>' exceeded time limits
during shut down. The process id was '344'.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
----
I'd like to know what I can do to troubleshoot this. Is there any
other logs I can check? Are there any diagnostic tools that I can
check?Hello,
Please take a look at following articles. These might be helpful in your
case.
828222 How to generate a dump file when ASP.NET deadlocks in IIS 6.0
http://support.microsoft.com/?id=828222
821268 PRB: Contention, poor performance, and deadlocks when you make Web
http://support.microsoft.com/?id=821268
HTH.
Thanks.
Ganesh Anekar
Microsoft Developer Support
Internet Information Server
****************************************
*****************************red">
account name for newsgroup participation only.<<
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
2004 Microsoft Corporation. All rights reserved.
****************************************
*****************************
"dreamlinetheater" <dreamlinetheater@.hotmail.com> wrote in message
news:e153da91.0411181313.145fa674@.posting.google.com...
>I have several sites running on Windows 2003 Server in true IIS 6 mode
> with Application pools. One site has about 9 Virtual Directories in
> it that are all configured to run as applications. Each of these have
> a dedicated application pool with all different memory settings in the
> Memory Recycling area.
> The applications are all .Net based applications. They are all pretty
> frequently used apps and as a rule of thumb, we assigned more memory
> in the app pools to the busier sites and less to the least busy sites.
> Here's the deal. Every once in a while, the application will hang up
> and not respond. Once I recycle the application, it's fine.
> I don't really get a whole lot of info from the developers other than
> "The site is hung up" The only thing I see is stuff like this in the
> eventlog. This is usually AFTER I recycle the application and it
> start working again.
> ----
> Event Type: Warning
> Event Source: W3SVC
> Event Category: None
> Event ID: 1013
> Date: 11/18/2004
> Time: 2:37:21 PM
> User: N/A
> Computer: <server name>
> Description:
> A process serving application pool <app name>' exceeded time limits
> during shut down. The process id was '344'.
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> ----
>
> I'd like to know what I can do to troubleshoot this. Is there any
> other logs I can check? Are there any diagnostic tools that I can
> check?

Troubleshooting ASP.Net Application Pools on IIS6

I have several sites running on Windows 2003 Server in true IIS 6 mode
with Application pools. One site has about 9 Virtual Directories in
it that are all configured to run as applications. Each of these have
a dedicated application pool with all different memory settings in the
Memory Recycling area.

The applications are all .Net based applications. They are all pretty
frequently used apps and as a rule of thumb, we assigned more memory
in the app pools to the busier sites and less to the least busy sites.

Here's the deal. Every once in a while, the application will hang up
and not respond. Once I recycle the application, it's fine.
I don't really get a whole lot of info from the developers other than
"The site is hung up" The only thing I see is stuff like this in the
eventlog. This is usually AFTER I recycle the application and it
start working again.

----------------
Event Type:Warning
Event Source:W3SVC
Event Category:None
Event ID:1013
Date:11/18/2004
Time:2:37:21 PM
User:N/A
Computer:<server name>
Description:
A process serving application pool <app name>' exceeded time limits
during shut down. The process id was '344'.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

----------------

I'd like to know what I can do to troubleshoot this. Is there any
other logs I can check? Are there any diagnostic tools that I can
check?Hello,

Please take a look at following articles. These might be helpful in your
case.

828222 How to generate a dump file when ASP.NET deadlocks in IIS 6.0
http://support.microsoft.com/?id=828222

821268 PRB: Contention, poor performance, and deadlocks when you make Web
http://support.microsoft.com/?id=821268

HTH.
Thanks.
Ganesh Anekar
Microsoft Developer Support
Internet Information Server
************************************************** *******************
>>Please do not send email directly to this alias. This is an online
account name for newsgroup participation only.<<

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.

2004 Microsoft Corporation. All rights reserved.
************************************************** *******************
"dreamlinetheater" <dreamlinetheater@.hotmail.com> wrote in message
news:e153da91.0411181313.145fa674@.posting.google.c om...
>I have several sites running on Windows 2003 Server in true IIS 6 mode
> with Application pools. One site has about 9 Virtual Directories in
> it that are all configured to run as applications. Each of these have
> a dedicated application pool with all different memory settings in the
> Memory Recycling area.
> The applications are all .Net based applications. They are all pretty
> frequently used apps and as a rule of thumb, we assigned more memory
> in the app pools to the busier sites and less to the least busy sites.
> Here's the deal. Every once in a while, the application will hang up
> and not respond. Once I recycle the application, it's fine.
> I don't really get a whole lot of info from the developers other than
> "The site is hung up" The only thing I see is stuff like this in the
> eventlog. This is usually AFTER I recycle the application and it
> start working again.
> ----------------
> Event Type: Warning
> Event Source: W3SVC
> Event Category: None
> Event ID: 1013
> Date: 11/18/2004
> Time: 2:37:21 PM
> User: N/A
> Computer: <server name>
> Description:
> A process serving application pool <app name>' exceeded time limits
> during shut down. The process id was '344'.
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> ----------------
>
> I'd like to know what I can do to troubleshoot this. Is there any
> other logs I can check? Are there any diagnostic tools that I can
> check?