Solved

Problem using a web service

Posted on 2004-10-13
4
203 Views
Last Modified: 2008-02-01
Dear All,
I am calling a .net assembly from a JSP page. I am doing so as below :
<%
String url = "TestForURLParamVB.exe";
response.sendRedirect(url + "?sessionID=" + session.getId());
%>

I have a web service written for storing, retrieving and deleting some xml file based on the session ID passed to it. I extract the session id using domain.GetData("APP_LAUNCH_URL"). I have added a web reference in the project.
Till this point, there is no problem. But once I try to initialise the web service object as :
Dim ws As New hemant.SessionWSService
It gives me an error as mentioned at the bottom. I am not able to get why it is searching for a config file.

If I excute the .net code directly ( without calling it from a jsp ) after commenting out the getData call, it is working fine and the necessary XML file is getting created. But once I try to use the getData call, it again gives the same error.
Any guess what is wrong. Is there any way out for this. Please help me out as this is urgent. Thanks in advance.
Hemant

Code goes like this
------------------------------------------------------------------
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim domain As AppDomain
        Dim obj As Object
        Dim url, sessionID As String
        Dim index As Integer

        'Dim ws As New hemant.SessionWSService

        domain = domain.CurrentDomain
        obj = domain.GetData("APP_LAUNCH_URL")
        If (Not obj Is Nothing) Then
            MsgBox(obj, MsgBoxStyle.Exclamation, "Test")
        End If
        url = obj
        index = url.IndexOf("?")
        url = url.Substring(index + 1)
        index = url.IndexOf("=")
        sessionID = url.Substring(index + 1)
        MsgBox(" Session id is : " & sessionID)

        'Dim sessionInfo As SessionExchange.SessionInfo
        'MsgBox("b4 creating new sessioninfo ")
        'sessionInfo = New SessionExchange.SessionInfo
        'sessionInfo.sessionID = "dkfhjksadfkakljsdf"
        'sessionInfo.userName = "Hemant"
        'sessionInfo.accessRights = "8"
        'MsgBox("sessioninfo created. sessionInfo.sessionID = " + sessionInfo.sessionID)
        'MsgBox("b4 calling the setsession info method")
        'sessionExcgService.setSessionInfo(sessionInfo)

    End Sub
   
Error displayed is
--------------------------------------------------------------------
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Configuration.ConfigurationException: Error loading XML file http://localhost:8080/signapplet/TestForURLParamVB.exe?sessionID=12870915328F56B3A667EB035325372D.config There is an invalid character in the given encoding. Line 1, position 3. (http://localhost:8080/signapplet/TestForURLParamVB.exe?sessionID=12870915328F56B3A667EB035325372D.config)
   at System.Configuration.ConfigurationSettings.GetConfig(String sectionName)
   at System.Web.Services.Configuration.WebServicesConfiguration.get_Current()
   at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
   at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
   at TestForURLParamVB.hemant.SessionWSService..ctor()
   at TestForURLParamVB.Form1.Form1_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
RegexAssembly3_0
    Assembly Version: 0.0.0.0
    Win32 Version: n/a
    CodeBase:
----------------------------------------
IEExecRemote
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/ieexecremote/1.0.5000.0__b03f5f7f11d50a3a/ieexecremote.dll
----------------------------------------
TestForURLParamVB
    Assembly Version: 1.0.1747.23273
    Win32 Version: n/a
    CodeBase: http://localhost:8080/signapplet/TestForURLParamVB.EXE
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System.Xml
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Web.Services
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.web.services/1.0.5000.0__b03f5f7f11d50a3a/system.web.services.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 7.0.5000.0
    Win32 Version: 7.10.3052.4
    CodeBase: file:///c:/winnt/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Web
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
0
Comment
Question by:hemant_visal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Expert Comment

by:Hans Langer
ID: 12297383
0
 

Author Comment

by:hemant_visal
ID: 12307116
Sorry if I haven't made it clear. I am not appending .config. The error is generated by .NET. Also I am not getting why it is trying to search for a .config file just after trying to instantiate an object of web service. I tried keeping  a .config file on the same location also. But still getting the same error. Also if I don't pass the session ID parameter, the application works fine. But as I need to send the session information to the .net exe, I have to either append it to the file name. Any work around will also help.

Experts, please help me out.
Hemant
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12664971
Closed, 250 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.net Progress Bar - Maximum Value too large 2 26
VB.net capture  result of a SQL query in variables 3 33
get combo value in class 5 24
Passing data between Forms 3 29
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question