Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   Debugging reference.vb (http://www.velocityreviews.com/forums/t786782-debugging-reference-vb.html)

Eric 12-07-2006 05:39 PM

Debugging reference.vb
 
Hello,

We have VB.NET dll that calls a web service. The webservice has a
public function DoSomething that has several parameters, in order to
specify the time out and url we added the following hacks to the
Reference.vb:

Public Sub New(ByVal URL As String, ByVal Timeout As Integer)
MyBase.New()

If URL <> "" Then
Me.Url = URL
Else
Me.Url = "http://myurl.asmx"
End If

If (Me.IsLocalFileSystemWebService(Me.Url) = True) Then
Me.UseDefaultCredentials = True
Me.useDefaultCredentialsSetExplicitly = False
Else
Me.useDefaultCredentialsSetExplicitly = True
End If

'set timeout
Me.Timeout = Timeout * 1000

End Sub

When we ported our app from VS 2003 to VS 2005, it generated a new
References.vb, so I had to go back into it to do our hacks. The
previous code snippet is the VS.NET 2005 version of the New after I've
made the changes. I know that you're not supposed to edit the
References.vb, but we're doing several things that I don't think would
be possible otherwise.

Modifying the New got the error to go away when we instantiate the web
service, but I'm getting some further errors so I'm trying to debug my
..NET dll. I'm having problems stepping into the New method inside
References.vb. Inside my .NET dll that calls the web service I have:

Dim AWebService As New com.somecopany.www.MyWebService(URL, Timeout)

I can't get into the New method. I have a breakpoint there, but I see
the message:

The Breakpoint will not currently be hit. Breakpoints cannot be set in
a method or class with the "DebuggerStepThrough" attribute when the
debugger option, "Just My Code" option is enabled. Does anyone know
how to turn off the "Just My Code" debugger option?

-Eric


Eric 12-07-2006 06:38 PM

Re: Debugging reference.vb
 

Eric wrote:
> Hello,
>
> We have VB.NET dll that calls a web service. The webservice has a
> public function DoSomething that has several parameters, in order to
> specify the time out and url we added the following hacks to the
> Reference.vb:
>
> Public Sub New(ByVal URL As String, ByVal Timeout As Integer)
> MyBase.New()
>
> If URL <> "" Then
> Me.Url = URL
> Else
> Me.Url = "http://myurl.asmx"
> End If
>
> If (Me.IsLocalFileSystemWebService(Me.Url) = True) Then
> Me.UseDefaultCredentials = True
> Me.useDefaultCredentialsSetExplicitly = False
> Else
> Me.useDefaultCredentialsSetExplicitly = True
> End If
>
> 'set timeout
> Me.Timeout = Timeout * 1000
>
> End Sub
>
> When we ported our app from VS 2003 to VS 2005, it generated a new
> References.vb, so I had to go back into it to do our hacks. The
> previous code snippet is the VS.NET 2005 version of the New after I've
> made the changes. I know that you're not supposed to edit the
> References.vb, but we're doing several things that I don't think would
> be possible otherwise.
>
> Modifying the New got the error to go away when we instantiate the web
> service, but I'm getting some further errors so I'm trying to debug my
> .NET dll. I'm having problems stepping into the New method inside
> References.vb. Inside my .NET dll that calls the web service I have:
>
> Dim AWebService As New com.somecopany.www.MyWebService(URL, Timeout)
>
> I can't get into the New method. I have a breakpoint there, but I see
> the message:
>
> The Breakpoint will not currently be hit. Breakpoints cannot be set in
> a method or class with the "DebuggerStepThrough" attribute when the
> debugger option, "Just My Code" option is enabled. Does anyone know
> how to turn off the "Just My Code" debugger option?
>
> -Eric


Tools | Options

Then, check "Show All Settings" then uncheck "Enable Just My Code"
allowed me to do it.



All times are GMT. The time now is 04:38 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.