Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Saturday, March 31, 2012

Triggering ItemCommand with ImageButton in Datagrid

Hi

I had a Delete Column in a datagrid that was a Linkbutton. That needed to
change into a ImageButton because of the design demands in the project. Then
how do I trigger the DeleteCommand with that button?

I don't want to have to add a AddHandler in the ItemCreated or ItemDataBound
for this ImageButton cause then I can't get the ID from the Row to delete as
easy...

please help/
Lars NetzelSpecify the ImageButton with CommandName="Delete" attribute.

<asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" .../
CommandNames Cancel, Delete, Edit, NextPage, Page, PrevPage, Select, Sort
and Update correspond to the same action with the DataGrid (DataGrid has
these command names predefined for cthese actions)

See docs for further details.

--
Teemu Keiski
ASP.NET MVP, Finland

"Lars Netzel" <uihsdf@.adf.se> wrote in message
news:%23edWRq6LFHA.3328@.TK2MSFTNGP14.phx.gbl...
> Hi
> I had a Delete Column in a datagrid that was a Linkbutton. That needed to
> change into a ImageButton because of the design demands in the project.
> Then how do I trigger the DeleteCommand with that button?
> I don't want to have to add a AddHandler in the ItemCreated or
> ItemDataBound for this ImageButton cause then I can't get the ID from the
> Row to delete as easy...
> please help/
> Lars Netzel
Ah, stupid me:) I wrote ItemCommand instead of CommandName... thx

/Lars

"Teemu Keiski" <joteke@.aspalliance.com> wrote in message
news:eHCfx26LFHA.3988@.tk2msftngp13.phx.gbl...
> Specify the ImageButton with CommandName="Delete" attribute.
> <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" .../>
> CommandNames Cancel, Delete, Edit, NextPage, Page, PrevPage, Select, Sort
> and Update correspond to the same action with the DataGrid (DataGrid has
> these command names predefined for cthese actions)
> See docs for further details.
> --
> Teemu Keiski
> ASP.NET MVP, Finland
> "Lars Netzel" <uihsdf@.adf.se> wrote in message
> news:%23edWRq6LFHA.3328@.TK2MSFTNGP14.phx.gbl...
>> Hi
>>
>> I had a Delete Column in a datagrid that was a Linkbutton. That needed to
>> change into a ImageButton because of the design demands in the project.
>> Then how do I trigger the DeleteCommand with that button?
>>
>> I don't want to have to add a AddHandler in the ItemCreated or
>> ItemDataBound for this ImageButton cause then I can't get the ID from the
>> Row to delete as easy...
>>
>> please help/
>> Lars Netzel
>>

Triggering ItemCommand with ImageButton in Datagrid

Hi
I had a Delete Column in a datagrid that was a Linkbutton. That needed to
change into a ImageButton because of the design demands in the project. Then
how do I trigger the DeleteCommand with that button?
I don't want to have to add a AddHandler in the ItemCreated or ItemDataBound
for this ImageButton cause then I can't get the ID from the Row to delete as
easy...
please help/
Lars NetzelSpecify the ImageButton with CommandName="Delete" attribute.
<asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" .../>
CommandNames Cancel, Delete, Edit, NextPage, Page, PrevPage, Select, Sort
and Update correspond to the same action with the DataGrid (DataGrid has
these command names predefined for cthese actions)
See docs for further details.
Teemu Keiski
ASP.NET MVP, Finland
"Lars Netzel" <uihsdf@.adf.se> wrote in message
news:%23edWRq6LFHA.3328@.TK2MSFTNGP14.phx.gbl...
> Hi
> I had a Delete Column in a datagrid that was a Linkbutton. That needed to
> change into a ImageButton because of the design demands in the project.
> Then how do I trigger the DeleteCommand with that button?
> I don't want to have to add a AddHandler in the ItemCreated or
> ItemDataBound for this ImageButton cause then I can't get the ID from the
> Row to delete as easy...
> please help/
> Lars Netzel
>
Ah, stupid me:) I wrote ItemCommand instead of CommandName... thx
/Lars
"Teemu Keiski" <joteke@.aspalliance.com> wrote in message
news:eHCfx26LFHA.3988@.tk2msftngp13.phx.gbl...
> Specify the ImageButton with CommandName="Delete" attribute.
> <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" .../>
> CommandNames Cancel, Delete, Edit, NextPage, Page, PrevPage, Select, Sort
> and Update correspond to the same action with the DataGrid (DataGrid has
> these command names predefined for cthese actions)
> See docs for further details.
> --
> Teemu Keiski
> ASP.NET MVP, Finland
> "Lars Netzel" <uihsdf@.adf.se> wrote in message
> news:%23edWRq6LFHA.3328@.TK2MSFTNGP14.phx.gbl...
>

Wednesday, March 28, 2012

Trouble accesing IIS 5.1

Hiya,

I am trying to open a new ASP.NET Web Application Project using Visual Studio .NET, but it is denied with the following error:

Web Server reported the following error when attempting to create or open the Web Project located at the following URL : "http://localhost/WebApplication1"
'HTTP/1.1 403 Access Forbidden'

I installed everything correctly, first IIS 5.1, then Visual Studio .NET with the update of ASP.NET to 1.1. The error was there even before the update, so I don't think that might be a cause for this problem.

Would appreciate your help guys, as I have to submit the project soon, and really need to get going. Thanks ever so much.To fix IIS mappings for ASP.NET, follow these steps:

1. Click Start -> run -> cmd - ENTER
2. At the command prompt, type the following, and then press ENTER:
"%windir%\Microsoft.NET\Framework\version\aspnet_regiis.exe" -i

In this path, version represents the version number of the .NET Framework that you installed on your server. You need to replace with the actual version number when you type the command.

3. Register the Aspnet_isapi.dll by clicking start -> run
4. In the Open text box, type "regsvr32 %windir%\Microsoft.NET\Framework\version\aspnet_isapi.dll" and then press ENTER
I have re-installed everything, first IIS 5.1, then Visual Studio .NET. Now, it is coming up with the "HTTP/1.1 500 Sever Error"

My initial problem was solved when I followed advice posted below:

http://weblogs.asp.net/jblizzard/archive/2003/07/28/10623.aspx

When I tried to run commands you provided, it returned an error, saying The command is not specified. I suspect it might be because I put 1.1 instead of version in that command. Probably it is not just 1.1 but the full version, which I don't know. Could you advice.

Thanks once again for your kind help.

Trouble creating New Project on localhost...

I want to create a new ASP.Net project on this path in Visual
Basic.Net:

"http://localhost/WEB3.Theorie"

I configured the 'WEB3.theorie' folder so that my ASP.Net account can
access it...
But I always get the same error >
-- http/1.1 500 Internal Server Error --

I still don't see what I've done wrong, but this IIS-stuff is rather
complex for me...
I know this could be a noobie situation, but I have to start
somewhere...

..mishcozii-sanI am having this exact same problem right now, but I am still waiting for a
solution. I am using Visual Studio 2005 vb Standard with IIS 5.1.

".mishcozii" wrote:

> I want to create a new ASP.Net project on this path in Visual
> Basic.Net:
> "http://localhost/WEB3.Theorie"
> I configured the 'WEB3.theorie' folder so that my ASP.Net account can
> access it...
> But I always get the same error >>
> -- http/1.1 500 Internal Server Error --
> I still don't see what I've done wrong, but this IIS-stuff is rather
> complex for me...
> I know this could be a noobie situation, but I have to start
> somewhere...
> ..mishcozii-san
>

Trouble creating New Project on localhost...

I want to create a new ASP.Net project on this path in Visual
Basic.Net:
"http://localhost/WEB3.Theorie"
I configured the 'WEB3.theorie' folder so that my ASP.Net account can
access it...
But I always get the same error >>
-- http/1.1 500 Internal Server Error --
I still don't see what I've done wrong, but this IIS-stuff is rather
complex for me...
I know this could be a noobie situation, but I have to start
somewhere...
.mishcozii-sanI am having this exact same problem right now, but I am still waiting for a
solution. I am using Visual Studio 2005 vb Standard with IIS 5.1.
".mishcozii" wrote:

> I want to create a new ASP.Net project on this path in Visual
> Basic.Net:
> "http://localhost/WEB3.Theorie"
> I configured the 'WEB3.theorie' folder so that my ASP.Net account can
> access it...
> But I always get the same error >>
> -- http/1.1 500 Internal Server Error --
> I still don't see what I've done wrong, but this IIS-stuff is rather
> complex for me...
> I know this could be a noobie situation, but I have to start
> somewhere...
> ..mishcozii-san
>

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

Monday, March 26, 2012

Trouble getting the ASP.NET error page to appear remotely

I have been developing a web application on a local host and then
using 'Copy Project' to copy all the files up to the ISP location.
When I run the application locally then all is OK. When I run the
application from the ISP site I get an runtime error.
Because the default page does not givem me any indication as to what
the actual problem is, then I change the web.config file using the
recommended custom error tags as follows:
<customErrors mode= "Off" />
This did not result in me getting the detailed page that would have
been displayed at the server on the ISP. So I tried to create a custom
page by creating a HTML file 'mycustompage.htm' and the modifying the
tag to give:
<customErrors mode= "RemoteOnly" defaultRedirect="mycustompage.htm" />
But the result is still the default page with no indication of error.
It is as if the application is not reading the web.config file.
The tag above had been entered inside the existing <system.web> tag.
Any help would be appreciated.
John L"John Lundrigan" <jonel@.glenavon1.demon.co.uk> wrote in message
news:gkqac05vk2ctuc2bchs18iru81muov4q21@.
4ax.com...
> I have been developing a web application on a local host and then
> using 'Copy Project' to copy all the files up to the ISP location.
> When I run the application locally then all is OK. When I run the
> application from the ISP site I get an runtime error.
...

> But the result is still the default page with no indication of error.
> It is as if the application is not reading the web.config file.
Maybe it isn't reading it. Try introducing a syntax error into the
web.config file and see if the syntax error is caught.
Are you sure your ISP has your app set up as an application in IIS?
--
John Saunders
johnwsaundersiii at hotmail

Trouble getting the ASP.NET error page to appear remotely

I have been developing a web application on a local host and then
using 'Copy Project' to copy all the files up to the ISP location.
When I run the application locally then all is OK. When I run the
application from the ISP site I get an runtime error.

Because the default page does not givem me any indication as to what
the actual problem is, then I change the web.config file using the
recommended custom error tags as follows:

<customErrors mode= "Off" /
This did not result in me getting the detailed page that would have
been displayed at the server on the ISP. So I tried to create a custom
page by creating a HTML file 'mycustompage.htm' and the modifying the
tag to give:

<customErrors mode= "RemoteOnly" defaultRedirect="mycustompage.htm" /
But the result is still the default page with no indication of error.
It is as if the application is not reading the web.config file.

The tag above had been entered inside the existing <system.web> tag.

Any help would be appreciated.

John L"John Lundrigan" <jonel@.glenavon1.demon.co.uk> wrote in message
news:gkqac05vk2ctuc2bchs18iru81muov4q21@.4ax.com...
> I have been developing a web application on a local host and then
> using 'Copy Project' to copy all the files up to the ISP location.
> When I run the application locally then all is OK. When I run the
> application from the ISP site I get an runtime error.
...

> But the result is still the default page with no indication of error.
> It is as if the application is not reading the web.config file.

Maybe it isn't reading it. Try introducing a syntax error into the
web.config file and see if the syntax error is caught.

Are you sure your ISP has your app set up as an application in IIS?
--
John Saunders
johnwsaundersiii at hotmail

Trouble opening a asp.net project

Hello,

I've inherited an vs2003 asp.net project from a fellow that had Windows
2000 advanced server as his development machine. As a result he mapped
the project to a web site (mapped to a non-standard port, 87 I think)
instead of mapping it to a virtual directory.

My dev machine is winxppro and my IIS doesn't allow me to create new web
sites. I've tried various techniques to be able to map it to a virtual
directory, but to no avail. I keep getting the error that "The file
path '[Physical Project Path]' does not correspond to the URL '[Project
URL]'. The two need to map to the same server location. HTTP Error 404:
File Not Found."

Is there a definitive guide somewhere that can walk me through the
process of moving the project to a state where I can work on it in
Windows XP?

Or any other advice would also be highly appreciated.

Regards,
RobertLook into the solution and project files and manually change the paths
within each.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"Frank Rizzo" <none@.none.com> wrote in message
news:%230xUfbMjGHA.1324@.TK2MSFTNGP04.phx.gbl...
> Hello,
> I've inherited an vs2003 asp.net project from a fellow that had Windows
> 2000 advanced server as his development machine. As a result he mapped
> the project to a web site (mapped to a non-standard port, 87 I think)
> instead of mapping it to a virtual directory.
> My dev machine is winxppro and my IIS doesn't allow me to create new web
> sites. I've tried various techniques to be able to map it to a virtual
> directory, but to no avail. I keep getting the error that "The file path
> '[Physical Project Path]' does not correspond to the URL '[Project URL]'.
> The two need to map to the same server location. HTTP Error 404: File Not
> Found."
> Is there a definitive guide somewhere that can walk me through the process
> of moving the project to a state where I can work on it in Windows XP?
> Or any other advice would also be highly appreciated.
> Regards,
> Robert

Trouble opening a asp.net project

Hello,
I've inherited an vs2003 asp.net project from a fellow that had Windows
2000 advanced server as his development machine. As a result he mapped
the project to a web site (mapped to a non-standard port, 87 I think)
instead of mapping it to a virtual directory.
My dev machine is winxppro and my IIS doesn't allow me to create new web
sites. I've tried various techniques to be able to map it to a virtual
directory, but to no avail. I keep getting the error that "The file
path '[Physical Project Path]' does not correspond to the URL '[Project
URL]'. The two need to map to the same server location. HTTP Error 404:
File Not Found."
Is there a definitive guide somewhere that can walk me through the
process of moving the project to a state where I can work on it in
Windows XP?
Or any other advice would also be highly appreciated.
Regards,
RobertLook into the solution and project files and manually change the paths
within each.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Frank Rizzo" <none@.none.com> wrote in message
news:%230xUfbMjGHA.1324@.TK2MSFTNGP04.phx.gbl...
> Hello,
> I've inherited an vs2003 asp.net project from a fellow that had Windows
> 2000 advanced server as his development machine. As a result he mapped
> the project to a web site (mapped to a non-standard port, 87 I think)
> instead of mapping it to a virtual directory.
> My dev machine is winxppro and my IIS doesn't allow me to create new web
> sites. I've tried various techniques to be able to map it to a virtual
> directory, but to no avail. I keep getting the error that "The file path
> '[Physical Project Path]' does not correspond to the URL '[Project URL]'.
> The two need to map to the same server location. HTTP Error 404: File Not
> Found."
> Is there a definitive guide somewhere that can walk me through the process
> of moving the project to a state where I can work on it in Windows XP?
> Or any other advice would also be highly appreciated.
> Regards,
> Robert

Trouble on creating a new web project - UNC share does not exist or you do not have access

Hello,

While I tried to create a new web project in VS.NET, I got the following
error message:
"Unable to create Web project 'Portal'. The UNC share
'E:\Project\Portal\Src\Web' does not exist or you do not have access."

My server's OS is Windows 2000 Server. My steps are:
In IIS:
1. create a virtual directory 'Portal'. Its local directory is
'E:\Project\Portal\Src\Web'.

In VS.NET:
2. in 'Add New Project' dialog box, select the followings and click 'OK'
button.
Project Types: Visual C# Projects
Templates: New Project In Existing Folder
Name: Portal

3. in 'Create a New Project in an Existing Folder' dialog box, input the
following and click 'OK' button.
Folder location: http://localhost/Portal

4. And then, VS.NET tell me the error message:
"Unable to create Web project 'Portal'. The UNC share
'E:\Project\Portal\Src\Web' does not exist or you do not have access."

Can you help me to resolve the problem? I have tried for many days.

Thank you very much,
SimonFrom your description, this seems to be the problem:
http://support.microsoft.com/defaul...kb;en-us;320265

Cheers
Ken

"Simon Chung-Jen Chuang" <cjchuang98@.seed.net.tw> wrote in message
news:%23$y8W$VaDHA.4020@.tk2msftngp13.phx.gbl...
: Hello,
:
: While I tried to create a new web project in VS.NET, I got the following
: error message:
: "Unable to create Web project 'Portal'. The UNC share
: 'E:\Project\Portal\Src\Web' does not exist or you do not have access."
:
: My server's OS is Windows 2000 Server. My steps are:
: In IIS:
: 1. create a virtual directory 'Portal'. Its local directory is
: 'E:\Project\Portal\Src\Web'.
:
: In VS.NET:
: 2. in 'Add New Project' dialog box, select the followings and click 'OK'
: button.
: Project Types: Visual C# Projects
: Templates: New Project In Existing Folder
: Name: Portal
:
: 3. in 'Create a New Project in an Existing Folder' dialog box, input the
: following and click 'OK' button.
: Folder location: http://localhost/Portal
:
: 4. And then, VS.NET tell me the error message:
: "Unable to create Web project 'Portal'. The UNC share
: 'E:\Project\Portal\Src\Web' does not exist or you do not have access."
:
: Can you help me to resolve the problem? I have tried for many days.

Trouble opening an existing web application

I have a copy of an existing project saved to a disk. However, I am unable to open through Visual Studios.Net. I created a new virtual directory through IIS and still cannot get it to open up. I receive an error saying that some of the components are not installed on the specified web server. Any help would be greatly appreciated.Could you please post the error message here?
Visual Studio cannot create or open the application. The likeliest problem is that required components are not installed to the local web server. Run visual studio .NET setup and add the web development tool.

Saturday, March 24, 2012

Trouble understanding StateServer!

I've got a project that is heirarcical in nature.
A security front end, then seperate projects. IE one solution, with mulitple
individual projects underneath.
I get the Unable to make the session state request to the session state
server Error message
I have set the StateServer setting in one of the projects config files. the
others are InProc can i mix and match. Each project is a web application in
its own right. The reason I ask is that if I copy the application and make
an new application at the root of WWWROOT the program works fine.
Any insight would be appriciated.I've sorted it thanks, it looks like it does not like web addresses with
spaces in it. Rename the virtual directory correctly and everything now
works fine.
"Ric Pullen" <Richard.Pullen-REMOVESPAM@.Hospital.nhs.uk> wrote in message
news:usEXjpIcEHA.1144@.TK2MSFTNGP11.phx.gbl...
> I've got a project that is heirarcical in nature.
> A security front end, then seperate projects. IE one solution, with
mulitple
> individual projects underneath.
> I get the Unable to make the session state request to the session state
> server Error message
> I have set the StateServer setting in one of the projects config files.
the
> others are InProc can i mix and match. Each project is a web application
in
> its own right. The reason I ask is that if I copy the application and
make
> an new application at the root of WWWROOT the program works fine.
> Any insight would be appriciated.
>

Trouble understanding StateServer!

I've got a project that is heirarcical in nature.

A security front end, then seperate projects. IE one solution, with mulitple
individual projects underneath.

I get the Unable to make the session state request to the session state
server Error message

I have set the StateServer setting in one of the projects config files. the
others are InProc can i mix and match. Each project is a web application in
its own right. The reason I ask is that if I copy the application and make
an new application at the root of WWWROOT the program works fine.

Any insight would be appriciated.I've sorted it thanks, it looks like it does not like web addresses with
spaces in it. Rename the virtual directory correctly and everything now
works fine.

"Ric Pullen" <Richard.Pullen-REMOVESPAM@.Hospital.nhs.uk> wrote in message
news:usEXjpIcEHA.1144@.TK2MSFTNGP11.phx.gbl...
> I've got a project that is heirarcical in nature.
> A security front end, then seperate projects. IE one solution, with
mulitple
> individual projects underneath.
> I get the Unable to make the session state request to the session state
> server Error message
> I have set the StateServer setting in one of the projects config files.
the
> others are InProc can i mix and match. Each project is a web application
in
> its own right. The reason I ask is that if I copy the application and
make
> an new application at the root of WWWROOT the program works fine.
> Any insight would be appriciated.

Trouble when creating new ASP .NET Web Project in Visual Studio .NET 2003

Hi all, my name is Ivan and I'm sort of newbie in ASP .NET

I installed Visual Studio .NET 2003, and also IIS 5.1 on OS XP Professional SP2.

I created and developed some great windows applications in Studio, but when I tried to do the same while creating new ASP .NET Project and New Web Project I received an error HTTP:1.1 500 Internal Server Error


Help me out, please

Hi did u check whether your IIS is running?

also try to browse ur page from IIS MMC...

also check whether you are getting any entries in your event log when u get this error


Thanks for the reply.

1. My IIS is running, of course.

2. I named my asp web project as "NewASPProj" and it is in C:\InetPub\wwwroot directory on my system.

I tested it with opening my IE and typed URL: http://localhost

It opened two asp pages IIS start and IIShelp.

3. As for the messages in event log I'll post it on a forum in a few days


Hi Ivan,

Based on my understanding, when you wanted to create the asp.net 1.x application with Visual Studio 2003, you got the error message above. If I have misunderstood you, please feel free to let me know.

The error message "HTTP:1.1 500 Internal Server Error" indicates that your server encounter an unexpected condition which prevented it from fulfilling the request.

Please make sure that the IIS works correctly. We can execute the iisreset at the command prompt to reset the IIS's setting. Besides, we should configure your asp.net 1.x application properly on the IIS.

For more information, seehttp://support.microsoft.com/kb/822319.

I hope this helps.

Thursday, March 22, 2012

Trouble with getting start ?

Hi everyone,

I have a problem with getting my project run. I put everything in my .aspx design but when i click "Start", IE appears with nothing inside and the address in IE is empty ? Anyone helps me pleaseDid you specify your start page?, if not in VS right click and PICK "Set as Start Page"...
I am using Web Matrix, where should i right click ? I didn't see "Set as Start Page" ?
Hi Harmonic,

I've been using .net web matrix for just about a week so i might say something wrong or that doesn't make much sense, but anyway I had your same problem and this is what i do:

I save my files in a folder called "test" which i created in my root folder (wwwroot) of IIS

then i open my browser and navigate to http://localhost/test/nameofthefile.aspx

hope it helps

Trouble with Javascript when converting 2003 webproject to a 2005 project using Master Pag

Hi All,

We've got an VS.2003 ASPNET (VB) webproject which we would like to convert
to VS.2005 so that we can make use of the Master Page feature. Converting
the initial pages to 2005 is not such a problem (some minor errors) but we
run into trouble when we're trying to insert a converted page into a master
page content-placeholder.

The original page has some Javascript in it which ofcourse references to
controls in a form in the page. The form name is "frmContent", the control
is "txtSubject". In Javascript this is refered to as:
document.frmContent.txtSubject. However when this page is in the content of
a master page the frmContent form had vanished from the rendered page (view
source). Not only that: the txtSubject control is renamed to:
ctl00_phMasterContent_txtSubject. Obviously the existing Javascript will not
function anymore.

Another strange thing: suddenly there's a new <form> in the page which I
haven't created: aspnetForm. I think this is created by the master page but
I'm not sure.

Has anyone encountered the same problems that I'm facing and what's the most
simple solution? Rewriting all Javascript is going to be a lot of work..

TIA
Friso Wiskerke> Another strange thing: suddenly there's a new <form> in the page which I
> haven't created: aspnetForm. I think this is created by the master page but
> I'm not sure.

Yes, this will be the server-side form created by default in the master
page; all the content placeholders should fall within it so you can use
server controls within your Content blocks without putting a <form
runat="server"> on each individual page.

> The original page has some Javascript in it which ofcourse references to
> controls in a form in the page. The form name is "frmContent", the control
> is "txtSubject".

If the form is server-side (runat="server"), then it could create
problems, as you may usually only have one server-side form per page
(which the master has provided for you)...

> However when this page is in the content of
> a master page the frmContent form had vanished from the rendered page (view
> source).

...so, you shouldn't need to have separate <form> elements in the
content-placeholder, and removing those tags may cause the contents to
render properly.

> the txtSubject control is renamed to:
> ctl00_phMasterContent_txtSubject. Obviously the existing Javascript will not
> function anymore.

This "name mangling" is necessary to keep identifiers unique within
different parts of the page. You can work around it by substituting the
result of <% txtSubject.ClientID %> into the Javascript at the relevant
points in place of txtSubject, and the correct form name instead of
frmContent; however, this might be tedious if you have large amounts of
code that needs modifying in this way. You could possibly set up a
Javascript object called frmContent [and call the real form something
different] then add members to it with names corresponding to the
original names, pointing to the actual controls with mangled names
inserted as above.

Trouble with Javascript when converting 2003 webproject to a 2005 project using Maste

Hi All,
We've got an VS.2003 ASPNET (VB) webproject which we would like to convert
to VS.2005 so that we can make use of the Master Page feature. Converting
the initial pages to 2005 is not such a problem (some minor errors) but we
run into trouble when we're trying to insert a converted page into a master
page content-placeholder.
The original page has some Javascript in it which ofcourse references to
controls in a form in the page. The form name is "frmContent", the control
is "txtSubject". In Javascript this is refered to as:
document.frmContent.txtSubject. However when this page is in the content of
a master page the frmContent form had vanished from the rendered page (view
source). Not only that: the txtSubject control is renamed to:
ctl00_phMasterContent_txtSubject. Obviously the existing Javascript will not
function anymore.
Another strange thing: suddenly there's a new <form> in the page which I
haven't created: aspnetForm. I think this is created by the master page but
I'm not sure.
Has anyone encountered the same problems that I'm facing and what's the most
simple solution? Rewriting all Javascript is going to be a lot of work..
TIA
Friso Wiskerke> Another strange thing: suddenly there's a new <form> in the page which I
> haven't created: aspnetForm. I think this is created by the master page bu
t
> I'm not sure.
Yes, this will be the server-side form created by default in the master
page; all the content placeholders should fall within it so you can use
server controls within your Content blocks without putting a <form
runat="server"> on each individual page.

> The original page has some Javascript in it which ofcourse references to
> controls in a form in the page. The form name is "frmContent", the control
> is "txtSubject".
If the form is server-side (runat="server"), then it could create
problems, as you may usually only have one server-side form per page
(which the master has provided for you)...

> However when this page is in the content of
> a master page the frmContent form had vanished from the rendered page (vie
w
> source).
...so, you shouldn't need to have separate <form> elements in the
content-placeholder, and removing those tags may cause the contents to
render properly.

> the txtSubject control is renamed to:
> ctl00_phMasterContent_txtSubject. Obviously the existing Javascript will n
ot
> function anymore.
This "name mangling" is necessary to keep identifiers unique within
different parts of the page. You can work around it by substituting the
result of <% txtSubject.ClientID %> into the Javascript at the relevant
points in place of txtSubject, and the correct form name instead of
frmContent; however, this might be tedious if you have large amounts of
code that needs modifying in this way. You could possibly set up a
Javascript object called frmContent [and call the real form something
different] then add members to it with names corresponding to the
original names, pointing to the actual controls with mangled names
inserted as above.

Trouble with Radiobuttons

Hi,

I am working on this project of creating webforms and this one particular page has a bunch of radiobuttons in it. Once the user clicks one of the radiobuttons and then clicks on submit, the user is redirected to a different webform. In the event handler for the submit button, I check to see if that one particular radiobutton has been clicked or not ,kinda like this below:

privatevoid InitializeComponent()

{

this.submit_button.Click +=new System.EventHandler(this.submit_button_Click);

}

privatevoid submit_button_Click(object sender, System.EventArgs e)

{

if (radiobutton1.Checked ==true)

{

Response.Redirect("page1.aspx");

}

The problem is when I check radiobutton1 and then click submit, nothing happens and I stay on the same page. I ran the debugger and it didn't even step through the code. Can anyone help me out here?

Try this - uses both types of radio button/list

<%@.PageLanguage="C#" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<scriptrunat="server">

protectedvoid RadioButton3_CheckedChanged(object sender,EventArgs e)

{

Response.Redirect("Default.aspx?Fruit=" + Server.HtmlEncode(((RadioButton)sender).Text));

}

protectedvoid RadioButtonList1_SelectedIndexChanged(object sender,EventArgs e)

{

Response.Redirect("Default.aspx?Fruit=" + Server.HtmlEncode(RadioButtonList1.SelectedValue));

}

</script>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Untitled Page</title>

</head>

<body>

<formid="form1"runat="server">

<div>

<asp:RadioButtonID="RadioButton1"runat="server"GroupName="RB1"Text="Apples"OnCheckedChanged="RadioButton3_CheckedChanged"/>

<asp:RadioButtonID="RadioButton2"runat="server"GroupName="RB1"Text="Oranges"

OnCheckedChanged="RadioButton3_CheckedChanged"/>

<asp:RadioButtonID="RadioButton3"runat="server"GroupName="RB1"Text="Gone Bananas"

OnCheckedChanged="RadioButton3_CheckedChanged"/>

</div>

<div>

<asp:RadioButtonListID="RadioButtonList1"runat="server"OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">

<asp:ListItem>Pears</asp:ListItem>

<asp:ListItem>Cherries</asp:ListItem>

<asp:ListItem>WinkleBerry</asp:ListItem>

</asp:RadioButtonList>

</div>

<asp:LinkButtonID="LinkButton1"runat="server">Submit</asp:LinkButton>

</form>

</body>

</html>


Thanks for the response...I am working with .aspx files...So instead of embedding scripts like you suggested, I have to write backend code in the .aspx.cs files..Its just that after I click on the submit button it should hit that part of the code where I have the event handler in case the submit button is clicked. I still can't figure out why its not doing that...I am working on a visual studio 2003 platform