Question : Permission Problems Creating Exchange Mailbox

Hi All,

I've got a strange permissions issue that i cant seem to get my head around

I'm trying to create a mailbox programatically using asp.net

i keep getting the error
"Processing data from remote server failed with the following error message: Access is denied. For more information, see the about_Remote_Troubleshooting Help topic."

i tried copying the same procedure into a vb console app and it works

the iis instance is running under the same credentials as my user account,

why does it work as a console app and not as a web app???

attached is my code
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
Public LiveUri As String = "http://***********/Powershell?serializationLevel=Full"

    Sub InitWsMan()
        Dim AdminPassSecure = New SecureString
        For Each c As Char In AdminPass
            AdminPassSecure.AppendChar(c)
        Next
        Dim cred = New PSCredential(AdminUser, AdminPassSecure)
        WS = New WSManConnectionInfo(New Uri(LiveUri), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", cred)
        WS.AuthenticationMechanism = AuthenticationMechanism.Default

        RS = RunspaceFactory.CreateRunspace(WS)
        PS = PowerShell.Create

        ServicePointManager.ServerCertificateValidationCallback = New Security.RemoteCertificateValidationCallback(AddressOf SSlOk)

    End Sub

    Sub EnableMailbox(ByVal Username As String, ByVal [Alias] As String)

        Dim cmd = New PSCommand
        cmd.AddCommand("Enable-Mailbox")
        cmd.AddParameter("Identity", Username)
        cmd.AddParameter("Alias", [Alias])

        PS.Commands = cmd
        PS.Runspace = RS

        Try
            RS.Open()
            Dim i = PS.Invoke
            RS.Close()

        Catch ex As Remoting.PSRemotingTransportException

        End Try

    End Sub

Answer : Permission Problems Creating Exchange Mailbox

what is the driver that is installed currently? is it the default generic one from microsoft?

what is the motherboard make and model?  i will try to find the correct driver download link.

cheers
Random Solutions  
 
programming4us programming4us