473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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!
Afshar

Jun 10 '06 #1
8 1711
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark Rae | last post by:
Hi, I've written a Windows service and added a Setup project to the solution. Is the only way to get the installation to run the InstallUtil part to actually install the executable as a...
0
by: Vipul Patel | last post by:
Hi, There is a project requirement to create an installer for a windows service created in VC++ 7.0 unmanaged code. Can any one guide to a link or working sample as to where I can get the...
10
by: fenway | last post by:
Hi, I'm new to ASP.NET and just finished up a small application. Essentially it's just a form that writes data to a CSV file on the server after a user fills in the form. The code compiles and...
2
by: timsohn | last post by:
I am trying to deploy the most basic web service (Hello World) example to my website, but am having significant trouble doing so. Here is what I am doing: 1) Create a New Web Service in VS 2005...
5
by: Richard Mintz | last post by:
Hi, I am trying to deploy a C# application to a Windows 2000 machine. When I try to run the app after the install i get a runtime error. the setup works on both XP and windows 2003 server...
10
by: Bryan Dickerson | last post by:
I fairly have my Web Service working the way that I want, so my next step will be to deploy it on a server. Do I just add a deployment/install project, build it and install it on the server? ...
1
by: Duncan | last post by:
Guys a little please, I'm creating a windows application that uses a webservice and WSE1.0 to talk to a database, currently this works fine when using localhost, I now want to test the...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
0
by: JM | last post by:
I have created simple windows service which just write message to event log when it starts and stops. I am able to install it succesfully using: installutil <service_file.exe>, where...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.