security issue using web services

S

steve

I want to read and update a SharePoint list from a InfoPath project
written in VB using Visual Studio 2003. I'm getting a security error
(System.Security.SecurityException) with the following code. I added
a web reference that i called com.cgishare.www.

Dim cgishareLists As New com.cgishare.www.Lists

cgishareLists.Credentials = New
System.Net.NetworkCredential("my SharePoint ID", _
"my password")

Try
Dim node As System.Xml.XmlNode =
cgishareLists.GetListItems("Incidents", _
String.Empty, Nothing,
Nothing, String.Empty, Nothing)
Catch ex As Exception

End Try

Here's the error:

Message = "Exception of type
'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown."

StackTrace = " at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at com.cgishare.www.Lists.GetListItems(String listName, String
viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode
queryOptions) in C:\my_data\Visual Studio Projects\New Jersey Request
and Replies\Web References\com.cgishare.www\Reference.vb:line 236
at
New_Jersey_Request_and_Replies.New_Jersey_Request_and_Replies._Startup(Application
app, XDocument doc) in C:\my_data\Visual Studio Projects\New Jersey
Request and Replies\FormCode.vb:line 37"

TargetSite = <error: an exception of type:
{System.Security.SecurityException} occurred>
System.Reflection.MethodBase



i'm stumped so far. any ideas?

thanks

steve
 
D

Don Reamey \(MSFT\)

Is this a browser based form?

Does this code work outside of InfoPath...i.e. as a console application?

What permissions / rights do you have on the list in question?
 
S

steve

Is this a browser based form?

Does this code work outside of InfoPath...i.e. as a console application?

What permissions / rights do you have on the list in question?
--
Don Reamey
Software Development Engineer
Microsoft Corporationhttp://blogs.officezealot.com/dreamey




I want to read and update a SharePoint list from a InfoPath project
written in VB using Visual Studio 2003.  I'm getting a security error
(System.Security.SecurityException) with the following code.  I added
a web reference that i called com.cgishare.www.
            Dim cgishareLists As New com.cgishare.www.Lists
           cgishareLists.Credentials = New
System.Net.NetworkCredential("my SharePoint ID", _
      "my password")
             Try
               Dim node As System.Xml.XmlNode =
cgishareLists.GetListItems("Incidents", _
                                         String.Empty, Nothing,
Nothing, String.Empty, Nothing)
           Catch ex As Exception
           End Try
Here's the error:
Message = "Exception of type
'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown."
StackTrace = "   at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClien­tMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
  at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
  at com.cgishare.www.Lists.GetListItems(StringlistName, String
viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode
queryOptions) in C:\my_data\Visual Studio Projects\New Jersey Request
and Replies\Web References\com.cgishare.www\Reference.vb:line 236
  at
New_Jersey_Request_and_Replies.New_Jersey_Request_and_Replies._Startup(Appl­ication
app, XDocument doc) in C:\my_data\Visual Studio Projects\New Jersey
Request and Replies\FormCode.vb:line 37"
TargetSite = <error: an exception of type:
{System.Security.SecurityException} occurred>
System.Reflection.MethodBase
i'm stumped so far.  any ideas?

steve- Hide quoted text -

- Show quoted text -

thanks for responding! it's not a browser based form. i don't know
my rights to the server - i'm waiting for the admin to responsed. i
can makes changes to the lists in SharePoint, i know that........

i turned the code into a console application. it seems that the
security issue is gone, but now there's a new issue.

error messages as a console app:

MicroSoft.SharePoint.SoapServer.SoapServer.Exeception
ex.TargetSite = System.Reflection.RuntimeMethodInfo

error messages as a InfoPath form

System.Web.Services.Protocols.SoapException
ex.TargetSite = an exception of type: {System.Security.Security
Exception occurred"}


is there a way to debug this further (i.e. get a more detailed error
message)?

thanks again
 

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