We've been having this problem for a while now. Our environment exists of multiple domains. We're now trying to create a distribution list using remote powershell on a different domain (and a different Active Directory).
What've done so far:
- Enable-PSRemoting on the remote machine
- Open the necessary ports for remote powershell to work
And now for the funny part; when we run the code to create a distribution list in a CONSOLE application, everything is fine. But we need it to work with ASP.NET, but when we're using the same code(!!!) we get an exception with the message: Access is Denied.
Since it's the same code, the username/password are the same as well, though we double and triple checked the username/password combination. We even tried different ways of impersonation, but to no avail.
Google/Bing didn't help out either, some people had the same problem, but we found no solutions.
What are we missing? In what way is ASP.NET different from a console application?
btw: we're using the ASP.NET development server for testing purposes. We haven't tried running it in IIS yet (could this be an issue?)
View Complete Post