Re: cannot call non-public or static methods remotely
From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 08/05/04
- Next message: Sam Santiago: "Re: IntegratedAuthentication/custom channel"
- Previous message: Sam Santiago: "Re: .net remote late bound client -how to"
- In reply to: sasidhar jill via .NET 247: "cannot call non-public or static methods remotely"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 4 Aug 2004 22:40:25 -0700
Have you tried simply stepping through the code in debug mode to see which
line generates the exception? Maybe your error is happening someplace other
than you think. One thing I did notice is that you initialize 'cust' two
times, once with the New clause in the declaration and then again with a
call to the Activator object. You would normally use one method or the
other not both.
Thanks,
Sam
-- _______________________________ Sam Santiago ssantiago@n0spam-SoftiTechture.com http://www.SoftiTechture.com _______________________________ "sasidhar jill via .NET 247" <anonymous@dotnet247.com> wrote in message news:%238uQ92heEHA.3428@TK2MSFTNGP11.phx.gbl... > (Type your message here) > Hi, > My application is like this. > When the client starts and the user wants to write to database or files to server. > he can do that only when a service is running on the server with a particular user. > the client connects to the remoting service(using the info from config file on the client) > > Now I have a dll which will do the write to the database/Fileserver. > my problem is that I need to have a config file on the server from which the dll can read it and get the info like fileserver/datbase etc., > > Now I have a config file when I try to connect it gives me this error. > > Permisionn denied: cannot call non-public or static methods remotely" > > Can you pleas e tell me where the error is? > > The Code that calls the remoting is > > Dim cust As New SingleCallCustomer > Dim objecturi > Dim appsettreader As New Configuration.AppSettingsReader '.AppSettingsReader > Dim testvar As String > testvar = GetSetting("objuri") > cust = Activator.GetObject(GetType(RemotingSample.SingleCallCustomer), objecturi) > ' cust.createdefaultfoldersstep2(intFolderid, strItemtype, newItem, strpath) > Dim testconfig As String > testconfig = cust.GetSetting("objuri") > testconfig = cust.GetSetting("mapphysicalpath") > testconfig = cust.GetSetting("TRASHCAN") > > > > Public Function GetSetting(ByVal Key As String) As String > Try > Dim config As XmlDocument = New XmlDocument > config.Load(".\\RemoteCustomer.dll.config") > Dim elemList As XmlNodeList = config.GetElementsByTagName("add") > Dim i As Integer > For i = 0 To elemList.Count - 1 Step i + 1 > If elemList(i).Attributes("key").Value.ToString() = Key Then > Return elemList(i).Attributes("value").Value.ToString() > End If > Next > Catch ex As Exception > ' Dim err As String = String.Format("{0} Error with GetSetting. Key = {1}\r\n{2}\r\n", System.DateTime.Now, Key, ex.ToString()) > ' WriteToLogFile(".\\FileManagerError_log.txt", err) > End Try > Return "" > End Function > -------------------------------- > From: sasidhar jill > > ----------------------- > Posted by a user from .NET 247 (http://www.dotnet247.com/) > > <Id>RhUlq0s8q0OaOISjuKzDkA==</Id>
- Next message: Sam Santiago: "Re: IntegratedAuthentication/custom channel"
- Previous message: Sam Santiago: "Re: .net remote late bound client -how to"
- In reply to: sasidhar jill via .NET 247: "cannot call non-public or static methods remotely"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading