Testing WCF Service failed (System.ServiceModel.AddressAccessDeniedException)

S

Stefan Hoffmann

hi @ll,

I'm testing a WCF service in a VS 2008 Pro test project. The tests fail
due to a System.ServiceModel.AddressAccessDeniedException.

I'm running VS as normal user. What privileges do I need? I don't want
to run my VS as administrator or add my user account to the local
administrator group.

Any clue or link is welcome.


mfG
--> stefan <--
 
M

Mr. Arnold

Stefan Hoffmann said:
hi @ll,

I'm testing a WCF service in a VS 2008 Pro test project. The tests fail
due to a System.ServiceModel.AddressAccessDeniedException.

I'm running VS as normal user. What privileges do I need? I don't want to
run my VS as administrator or add my user account to the local
administrator group.

Any clue or link is welcome.


I have never been on a NT based development machine at work or home that I
was not logged in as admin doing development work. I suggest that you do the
same.


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4080 (20090515) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
M

Mr. Arnold

Stefan Hoffmann said:
hi @ll,

I'm testing a WCF service in a VS 2008 Pro test project. The tests fail
due to a System.ServiceModel.AddressAccessDeniedException.

I'm running VS as normal user. What privileges do I need? I don't want to
run my VS as administrator or add my user account to the local
administrator group.

Any clue or link is welcome.


I have never been on a NT based development machine at work or home that I
was not logged in as admin doing development work. I suggest that you do the
same.


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4080 (20090515) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
S

Stefan Hoffmann

hi Peter,

Thanks for your answer.

Peter said:
As for what specific privileges you need, I don't know. You didn't post
any code, nor did you make any statement as to what your code is
attempting to do when the exception occurs.
Sorry, my fault as I've should known better, fyi:

The failing test method is InitializeHost():
---
[TestClass]
public class CalculatorServiceTest : CalculatorLogicTest
{
private ServiceHost serviceHost;

private string testAddress = "http://localhost:9999/Calculator";

private Binding testBinding = new WSHttpBinding();

[TestInitialize]
public void InitializeHost()
{
serviceHost = new ServiceHost(typeof(Calculator));
serviceHost.AddServiceEndpoint(
typeof(ICalculator), testBinding, new Uri(testAddress));
serviceHost.Open();
}

---

The exception occurs in when opening the service host (serviceHost.Open()).


The exception message:
---
HTTP could not register URL http://+:9999/Calculator/. Your process does
not have access rights to this namespace (see
http://go.microsoft.com/fwlink/?LinkId=70353 for details).
---

The test error message:
---
Initialization method
WcfServiceTestTest.CalculatorServiceTest.InitializeHost threw exception.
System.ServiceModel.AddressAccessDeniedException:
System.ServiceModel.AddressAccessDeniedException: HTTP could not
register URL http://+:9999/Calculator/. Your process does not have
access rights to this namespace (see
http://go.microsoft.com/fwlink/?LinkId=70353 for details). --->
System.Net.HttpListenerException: Access is denied.
 
S

Stefan Hoffmann

hi Peter,

Thanks for your answer.

Peter said:
As for what specific privileges you need, I don't know. You didn't post
any code, nor did you make any statement as to what your code is
attempting to do when the exception occurs.
Sorry, my fault as I've should known better, fyi:

The failing test method is InitializeHost():
---
[TestClass]
public class CalculatorServiceTest : CalculatorLogicTest
{
private ServiceHost serviceHost;

private string testAddress = "http://localhost:9999/Calculator";

private Binding testBinding = new WSHttpBinding();

[TestInitialize]
public void InitializeHost()
{
serviceHost = new ServiceHost(typeof(Calculator));
serviceHost.AddServiceEndpoint(
typeof(ICalculator), testBinding, new Uri(testAddress));
serviceHost.Open();
}

---

The exception occurs in when opening the service host (serviceHost.Open()).


The exception message:
---
HTTP could not register URL http://+:9999/Calculator/. Your process does
not have access rights to this namespace (see
http://go.microsoft.com/fwlink/?LinkId=70353 for details).
---

The test error message:
---
Initialization method
WcfServiceTestTest.CalculatorServiceTest.InitializeHost threw exception.
System.ServiceModel.AddressAccessDeniedException:
System.ServiceModel.AddressAccessDeniedException: HTTP could not
register URL http://+:9999/Calculator/. Your process does not have
access rights to this namespace (see
http://go.microsoft.com/fwlink/?LinkId=70353 for details). --->
System.Net.HttpListenerException: Access is denied.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top