By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,426 Members | 3,407 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,426 IT Pros & Developers. It's quick & easy.

Trouble deploying an ASP.NET project that uses a SERVICE

P: n/a
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

Jun 10 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Are 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" <af************@gmail.com> wrote in message
news:11**********************@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

Jun 10 '06 #2

P: n/a
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

Jun 11 '06 #3

P: n/a
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" <af************@gmail.com> wrote in message
news:11**********************@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

Jun 11 '06 #4

P: n/a
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" <af************@gmail.com> wrote in message
news:11**********************@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


Jun 15 '06 #5

P: n/a
re:
But I don't know what rights to grant the anonymous user.
Please review this article :

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

and this article :
http://msdn.microsoft.com/library/de...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 español : http://asp.net.do/foros/
===================================
"Afshar" <af************@gmail.com> wrote in message
news:11*********************@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" <af************@gmail.com> wrote in message
news:11**********************@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
>

Jun 15 '06 #6

P: n/a
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/de...aght000009.asp
for instructions on how to create a service account for ASP.NET

and this article :
http://msdn.microsoft.com/library/de...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 español : http://asp.net.do/foros/
===================================
"Afshar" <af************@gmail.com> wrote in message
news:11*********************@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" <af************@gmail.com> wrote in message
news:11**********************@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
>


Jun 18 '06 #7

P: n/a
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 español : http://asp.net.do/foros/
===================================
"Afshar" <af************@gmail.com> wrote in message
news:11**********************@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/de...aght000009.asp
for instructions on how to create a service account for ASP.NET

and this article :
http://msdn.microsoft.com/library/de...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 español : http://asp.net.do/foros/
===================================
"Afshar" <af************@gmail.com> wrote in message
news:11*********************@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" <af************@gmail.com> wrote in message
news:11**********************@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
>

Jun 18 '06 #8

P: n/a
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

Jun 19 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.