Click here to Skip to main content
15,891,734 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: using nested repeater Pin
Not Active19-Nov-10 10:42
mentorNot Active19-Nov-10 10:42 
GeneralRe: using nested repeater Pin
Dhyanga23-Nov-10 5:19
Dhyanga23-Nov-10 5:19 
GeneralRe: using nested repeater Pin
Not Active23-Nov-10 5:28
mentorNot Active23-Nov-10 5:28 
QuestionHyper Reference Tag from SQL Procedure [modified] Pin
Satish_S16-Nov-10 23:51
Satish_S16-Nov-10 23:51 
AnswerRe: Hyper Reference Tag from SQL Procedure Pin
Satish_S17-Nov-10 22:32
Satish_S17-Nov-10 22:32 
QuestionInvalid typecast with checkbox checked attibute using DataBinder.Eval Pin
grewin16-Nov-10 23:45
grewin16-Nov-10 23:45 
AnswerRe: Invalid typecast with checkbox checked attibute using DataBinder.Eval Pin
C#Coudou26-Nov-10 16:59
C#Coudou26-Nov-10 16:59 
QuestionVS2008 SOAP Client - losing Session problem Pin
anbam16-Nov-10 22:34
anbam16-Nov-10 22:34 
i made a Web Service project in visual studio 2008.
then added 2 "Web Service" files to the project.

Service1.asmx
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel

' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <system.web.script.services.scriptservice()> _
<system.web.services.webservice(namespace:="http://tempuri.org/")> _
<system.web.services.webservicebinding(conformsto:=WsiProfiles.BasicProfile1_1)> _
<toolboxitem(false)> _
Public Class Service1
Inherits System.Web.Services.WebService

<webmethod(true)> _
Public Function HelloWorld() As String
Session("foo") = "bar"
Return "Hello World"
End Function

End Class


Service2.asmx
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel

' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <system.web.script.services.scriptservice()> _
<system.web.services.webservice(namespace:="http://tempuri.org/")> _
<system.web.services.webservicebinding(conformsto:=WsiProfiles.BasicProfile1_1)> _
<toolboxitem(false)> _
Public Class Service2
Inherits System.Web.Services.WebService

<webmethod(true)> _
Public Function HelloWorld() As String
If Session("foo") <> "bar" Then
Throw New UnauthorizedAccessException
End If
Return "Hello World"
End Function

End Class



After i made a windows application, where i made a "Service Reference" to both web service classes/files.

The problem is that Service1.asmx doesn't share it's session with Service2.asmx,...
I get the thrown "UnauthorizedAccessException" on calling "Service2.HelloWorld()" because the session is not created in Service2.asmx after calling Service2...
Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim bhp As New System.ServiceModel.BasicHttpBinding
bhp.AllowCookies = True

Dim x As New ServiceReference1.Service1SoapClient(bhp, New ServiceModel.EndpointAddress("http://localhost/ImsBrowserWebService/Service1.asmx"))
Dim y As New ServiceReference2.Service2SoapClient(bhp, New ServiceModel.EndpointAddress("http://localhost/ImsBrowserWebService/Service2.asmx"))
MsgBox(x.HelloWorld)
MsgBox(y.HelloWorld)

' Dim x As New localhost.Service1
' MsgBox(x.HelloWorld())

' Dim y As New localhost1.Service2
' MsgBox(y.HelloWorld())
End Sub
End Class

How to share the session between those files,... In Visual Studio 2003 it works fine when calling the service from javascript,... Now in visual studio 2008 with the soap client wizards it doesn't...

Any help would be welcome,

...
allowcookies="true"
Questionparent/child window Pin
C#Coudou16-Nov-10 21:00
C#Coudou16-Nov-10 21:00 
QuestionFileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
David Hovey16-Nov-10 16:20
David Hovey16-Nov-10 16:20 
AnswerRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
Eddy Vluggen17-Nov-10 0:16
professionalEddy Vluggen17-Nov-10 0:16 
GeneralRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
David Hovey17-Nov-10 1:46
David Hovey17-Nov-10 1:46 
GeneralRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
Eddy Vluggen17-Nov-10 4:53
professionalEddy Vluggen17-Nov-10 4:53 
AnswerRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
T M Gray17-Nov-10 9:27
T M Gray17-Nov-10 9:27 
GeneralRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
David Hovey17-Nov-10 17:34
David Hovey17-Nov-10 17:34 
Questionlink button under repeater Pin
Dhyanga16-Nov-10 7:14
Dhyanga16-Nov-10 7:14 
AnswerRe: link button under repeater Pin
Eddy Vluggen16-Nov-10 9:10
professionalEddy Vluggen16-Nov-10 9:10 
GeneralRe: link button under repeater Pin
Dhyanga16-Nov-10 9:17
Dhyanga16-Nov-10 9:17 
Questionsession start is getting fired on each page click Pin
raghvendrapanda16-Nov-10 1:20
raghvendrapanda16-Nov-10 1:20 
Questionregarding update panel event Pin
Tridip Bhattacharjee16-Nov-10 0:36
professionalTridip Bhattacharjee16-Nov-10 0:36 
Questionstandard mobile resolation Pin
behzadcp15-Nov-10 23:37
professionalbehzadcp15-Nov-10 23:37 
AnswerRe: standard mobile resolation Pin
NeverHeardOfMe16-Nov-10 1:44
NeverHeardOfMe16-Nov-10 1:44 
GeneralRe: standard mobile resolation Pin
RaviRanjanKr17-Dec-10 21:28
professionalRaviRanjanKr17-Dec-10 21:28 
QuestionmailMsg.BodyFormat Pin
padmanabhan N15-Nov-10 22:31
padmanabhan N15-Nov-10 22:31 
AnswerRe: mailMsg.BodyFormat Pin
NeverHeardOfMe15-Nov-10 23:13
NeverHeardOfMe15-Nov-10 23:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.