Wednesday, March 28, 2012
Trouble compiling HelloWorld with vbc
I can't compile anything with vbc, so i am asking for help please.
I have a file helloworld.aspx written in asp.net using vb, here it is:
<script runat="server" language="vb">
'=======================================
====================================
==
'=======================================
====================================
==
' HelloWorld.aspx
'=======================================
====================================
==
'=======================================
====================================
==
' ========================================
=============
' Begin
' ========================================
=============
Private Sub Page_Load()
' Print "Hello World !"
Response.write ("Hello World !")
End Sub
' ========================================
=============
' End
' ========================================
=============
</script>
Then i have a file compilehelloworld.bat, here it is:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.exe helloworld.aspx
/target:library /out:helloworld.dll /reference:System.dll > comp.log
The file helloworld.aspx works great when i don't compile it, but when
i execute compilehelloworld.bat, here is the result:
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.
<script runat="server" language="vb">
~~~~~
D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
not valid in a namespace.
Private Sub Page_Load()
~~~~~~~~~~~~~~~~~~~~~~~
D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
expected.
</script>
~
Can anyone tell me what is wrong ? Thanks.You should use "code behind" if you do this. For now you can't compile ASPX
page, they are compiled on the fly and are pre-processed before compilation
(for example <script> is not part of the VB.NET language).
Patrice
"Mister.programmer" <mister.mwa@.laposte.net> a crit dans le message de
news:16785fd2.0502100939.354ae34b@.posting.google.com...
> Hi,
> I can't compile anything with vbc, so i am asking for help please.
> I have a file helloworld.aspx written in asp.net using vb, here it is:
>
> <script runat="server" language="vb">
>
'=======================================
====================================
==
>
'=======================================
====================================
==
> ' HelloWorld.aspx
>
'=======================================
====================================
==
>
'=======================================
====================================
==
>
> ' ========================================
=============
> ' Begin
> ' ========================================
=============
> Private Sub Page_Load()
> ' Print "Hello World !"
> Response.write ("Hello World !")
> End Sub
> ' ========================================
=============
> ' End
> ' ========================================
=============
> </script>
>
> Then i have a file compilehelloworld.bat, here it is:
>
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.exe helloworld.aspx
> /target:library /out:helloworld.dll /reference:System.dll > comp.log
>
> The file helloworld.aspx works great when i don't compile it, but when
> i execute compilehelloworld.bat, here is the result:
>
> Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
> for Microsoft (R) .NET Framework version 1.1.4322.573
> Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
> D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.
> <script runat="server" language="vb">
> ~~~~~
> D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
> not valid in a namespace.
> Private Sub Page_Load()
> ~~~~~~~~~~~~~~~~~~~~~~~
> D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
> expected.
> </script>
> ~
>
> Can anyone tell me what is wrong ? Thanks.
Patrice wrote:
> You should use "code behind" if you do this. For now you can't
compile ASPX
> page, they are compiled on the fly and are pre-processed before
compilation
> (for example <script> is not part of the VB.NET language).
> Patrice
>
Thank you for this information. Could you give me the equivalent in
"code behind" for this helloworld.aspx and compilehelloworld.bat ?
Thanks.
Me again: For anyone having the same question and coming to this
thread, here is a good link.
http://www.samspublishing.com/artic...cle.asp?p=25468
Trouble compiling HelloWorld with vbc
I can't compile anything with vbc, so i am asking for help please.
I have a file helloworld.aspx written in asp.net using vb, here it is:
<script runat="server" language="vb">
'================================================= ============================
'================================================= ============================
' HelloWorld.aspx
'================================================= ============================
'================================================= ============================
' ================================================== ===
' Begin
' ================================================== ===
Private Sub Page_Load()
' Print "Hello World !"
Response.write ("Hello World !")
End Sub
' ================================================== ===
' End
' ================================================== ===
</script
Then i have a file compilehelloworld.bat, here it is:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.e xe helloworld.aspx
/target:library /out:helloworld.dll /reference:System.dll > comp.log
The file helloworld.aspx works great when i don't compile it, but when
i execute compilehelloworld.bat, here is the result:
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.
<script runat="server" language="vb">
~~~~~
D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
not valid in a namespace.
Private Sub Page_Load()
~~~~~~~~~~~~~~~~~~~~~~~
D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
expected.
</script>
~
Can anyone tell me what is wrong ? Thanks.You should use "code behind" if you do this. For now you can't compile ASPX
page, they are compiled on the fly and are pre-processed before compilation
(for example <script> is not part of the VB.NET language).
Patrice
--
"Mister.programmer" <mister.mwa@.laposte.net> a crit dans le message de
news:16785fd2.0502100939.354ae34b@.posting.google.c om...
> Hi,
> I can't compile anything with vbc, so i am asking for help please.
> I have a file helloworld.aspx written in asp.net using vb, here it is:
>
> <script runat="server" language="vb">
'================================================= ==========================
==
'================================================= ==========================
==
> ' HelloWorld.aspx
'================================================= ==========================
==
'================================================= ==========================
==
>
> ' ================================================== ===
> ' Begin
> ' ================================================== ===
> Private Sub Page_Load()
> ' Print "Hello World !"
> Response.write ("Hello World !")
> End Sub
> ' ================================================== ===
> ' End
> ' ================================================== ===
> </script>
>
> Then i have a file compilehelloworld.bat, here it is:
>
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.e xe helloworld.aspx
> /target:library /out:helloworld.dll /reference:System.dll > comp.log
>
> The file helloworld.aspx works great when i don't compile it, but when
> i execute compilehelloworld.bat, here is the result:
>
> Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
> for Microsoft (R) .NET Framework version 1.1.4322.573
> Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
> D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.
> <script runat="server" language="vb">
> ~~~~~
> D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
> not valid in a namespace.
> Private Sub Page_Load()
> ~~~~~~~~~~~~~~~~~~~~~~~
> D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
> expected.
> </script>
> ~
>
> Can anyone tell me what is wrong ? Thanks.
Patrice wrote:
> You should use "code behind" if you do this. For now you can't
compile ASPX
> page, they are compiled on the fly and are pre-processed before
compilation
> (for example <script> is not part of the VB.NET language).
> Patrice
Thank you for this information. Could you give me the equivalent in
"code behind" for this helloworld.aspx and compilehelloworld.bat ?
Thanks.
Me again: For anyone having the same question and coming to this
thread, here is a good link.
http://www.samspublishing.com/artic...cle.asp?p=25468
Trouble deploying an ASP.NET project that uses a SERVICE
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
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 aspnet_wp.exe
I have written a ASP.NET (C#) front-end that connects to an unmanaged win32
c++ dll. A few problems occur:
-I am unable to use the IO stream (write to an event log) from the dll.
Although I can successfully use an IO stream when calling the dll from a
regular .net Windows Form.
-The program behaves very inconsitently. Normally I can connect to my
database (via the unmanaged C++ dll) for the first time only. After this it
will crash everytime UNTIL I restart the aspnet_wp process from the task
manager (at which time I can again connect to the database one time).
This will never be a productive product unless I can get a handle on why I
need to reboot aspnet_wp every 5 minutes.
Has anyone else experienced problems with aspnet_wp.exe?
Thanks!The ASPNET user under which the web application will run will not be able to
write to a file (I assume thats what you are using the stream for) without
explicit access/priveleges to do so. You need to give the ASPNET user enough
permissions to write to the specified directory/file.
As to your database problem, it sounds like the connection is being opened,
then not closed properly and no more connections are being allowed. Perhaps
connection pooling has been disabled? What is your connection string?
- Paul Glavich
Microsoft MVP - ASP.NET
"Akoni" <anthonyjk@.cox.net> wrote in message
news:uXixFo2UEHA.2716@.tk2msftngp13.phx.gbl...
> Hello,
> I have written a ASP.NET (C#) front-end that connects to an unmanaged
win32
> c++ dll. A few problems occur:
> -I am unable to use the IO stream (write to an event log) from the dll.
> Although I can successfully use an IO stream when calling the dll from a
> regular .net Windows Form.
> -The program behaves very inconsitently. Normally I can connect to my
> database (via the unmanaged C++ dll) for the first time only. After this
it
> will crash everytime UNTIL I restart the aspnet_wp process from the task
> manager (at which time I can again connect to the database one time).
> This will never be a productive product unless I can get a handle on why I
> need to reboot aspnet_wp every 5 minutes.
> Has anyone else experienced problems with aspnet_wp.exe?
> Thanks!
>
Thanks Paul,
Your saying that my ASPNET account has read-only privileges to my file
system? How would I go about changing the privileges of the ASPNET account?
I am actually using a Versant database (C++ Object-Oriented
database...non-.NET compliant) on the back-end. Since it does not support
.NET objects, I have to use an unmanaged non-COM C++ DLL to access and stor
e
to it (via marshalling from c# to the unmanaged c++). The problem is that I
get very strange and inconsistent behavior.
I can actually connect to the database and even interact with it for a
period of time. Eventually though, every call to the unmanaged code causes
some generic error message to pop up...even upon rebooting the app! That is,
until I reboot aspnet_wp...which seems to clear "everything" out.
Thanks for your help.
"Paul Glavich [MVP - ASP.NET]" <glav@.aspalliance.com-NOSPAM> wrote in
message news:esV6PU6UEHA.2408@.tk2msftngp13.phx.gbl...
> The ASPNET user under which the web application will run will not be able
to
> write to a file (I assume thats what you are using the stream for) without
> explicit access/priveleges to do so. You need to give the ASPNET user
enough
> permissions to write to the specified directory/file.
> As to your database problem, it sounds like the connection is being
opened,
> then not closed properly and no more connections are being allowed.
Perhaps
> connection pooling has been disabled? What is your connection string?
> --
> - Paul Glavich
> Microsoft MVP - ASP.NET
>
> "Akoni" <anthonyjk@.cox.net> wrote in message
> news:uXixFo2UEHA.2716@.tk2msftngp13.phx.gbl...
> win32
> it
I
>
Trouble with aspnet_wp.exe
I have written a ASP.NET (C#) front-end that connects to an unmanaged win32
c++ dll. A few problems occur:
-I am unable to use the IO stream (write to an event log) from the dll.
Although I can successfully use an IO stream when calling the dll from a
regular .net Windows Form.
-The program behaves very inconsitently. Normally I can connect to my
database (via the unmanaged C++ dll) for the first time only. After this it
will crash everytime UNTIL I restart the aspnet_wp process from the task
manager (at which time I can again connect to the database one time).
This will never be a productive product unless I can get a handle on why I
need to reboot aspnet_wp every 5 minutes.
Has anyone else experienced problems with aspnet_wp.exe?
Thanks!The ASPNET user under which the web application will run will not be able to
write to a file (I assume thats what you are using the stream for) without
explicit access/priveleges to do so. You need to give the ASPNET user enough
permissions to write to the specified directory/file.
As to your database problem, it sounds like the connection is being opened,
then not closed properly and no more connections are being allowed. Perhaps
connection pooling has been disabled? What is your connection string?
--
- Paul Glavich
Microsoft MVP - ASP.NET
"Akoni" <anthonyjk@.cox.net> wrote in message
news:uXixFo2UEHA.2716@.tk2msftngp13.phx.gbl...
> Hello,
> I have written a ASP.NET (C#) front-end that connects to an unmanaged
win32
> c++ dll. A few problems occur:
> -I am unable to use the IO stream (write to an event log) from the dll.
> Although I can successfully use an IO stream when calling the dll from a
> regular .net Windows Form.
> -The program behaves very inconsitently. Normally I can connect to my
> database (via the unmanaged C++ dll) for the first time only. After this
it
> will crash everytime UNTIL I restart the aspnet_wp process from the task
> manager (at which time I can again connect to the database one time).
> This will never be a productive product unless I can get a handle on why I
> need to reboot aspnet_wp every 5 minutes.
> Has anyone else experienced problems with aspnet_wp.exe?
> Thanks!
Thanks Paul,
Your saying that my ASPNET account has read-only privileges to my file
system? How would I go about changing the privileges of the ASPNET account?
I am actually using a Versant database (C++ Object-Oriented
database...non-.NET compliant) on the back-end. Since it does not support
..NET objects, I have to use an unmanaged non-COM C++ DLL to access and store
to it (via marshalling from c# to the unmanaged c++). The problem is that I
get very strange and inconsistent behavior.
I can actually connect to the database and even interact with it for a
period of time. Eventually though, every call to the unmanaged code causes
some generic error message to pop up...even upon rebooting the app! That is,
until I reboot aspnet_wp...which seems to clear "everything" out.
Thanks for your help.
"Paul Glavich [MVP - ASP.NET]" <glav@.aspalliance.com-NOSPAM> wrote in
message news:esV6PU6UEHA.2408@.tk2msftngp13.phx.gbl...
> The ASPNET user under which the web application will run will not be able
to
> write to a file (I assume thats what you are using the stream for) without
> explicit access/priveleges to do so. You need to give the ASPNET user
enough
> permissions to write to the specified directory/file.
> As to your database problem, it sounds like the connection is being
opened,
> then not closed properly and no more connections are being allowed.
Perhaps
> connection pooling has been disabled? What is your connection string?
> --
> - Paul Glavich
> Microsoft MVP - ASP.NET
>
> "Akoni" <anthonyjk@.cox.net> wrote in message
> news:uXixFo2UEHA.2716@.tk2msftngp13.phx.gbl...
> > Hello,
> > I have written a ASP.NET (C#) front-end that connects to an unmanaged
> win32
> > c++ dll. A few problems occur:
> > -I am unable to use the IO stream (write to an event log) from the dll.
> > Although I can successfully use an IO stream when calling the dll from a
> > regular .net Windows Form.
> > -The program behaves very inconsitently. Normally I can connect to my
> > database (via the unmanaged C++ dll) for the first time only. After this
> it
> > will crash everytime UNTIL I restart the aspnet_wp process from the task
> > manager (at which time I can again connect to the database one time).
> > This will never be a productive product unless I can get a handle on why
I
> > need to reboot aspnet_wp every 5 minutes.
> > Has anyone else experienced problems with aspnet_wp.exe?
> > Thanks!