|
Hi,
I'll Assume that the class that inherits from SoapHeader called SessionHeader.
Dim oWS As New wsns.WebServiceName
Dim oSession As New wsns.SessionHeader
oSession.Session = "New Session..."
oWS.SessionHeaderValue = oSession
* wsns = WebService Namespace
Hope this helps ... and Enjoy
|
|
|
|
|
Hello,
first thank you. But my problem is not resolved. I will show you some code to understand my problem.
First the Webservice in PHP (This is ReadOnly Code, i couldn't change it)
function securityCheck($userid = null, $password = null) {
global $server;
$auth = new Authentication();
if (isset($server->requestHeader['Session'])) {
session_id($server->requestHeader['Session']);
} else {
$error = $auth->Login($userid, $password);
if($error != "") {
return false;
}
}
return $auth->IsLoggedIn();
}
function login($userid, $password) {
if (!securityCheck($userid, $password)) {
return new nusoap_fault('Client','',"Invalid userid/password",'');
}
return session_id();
}
The Login works fine. But then i get a Session ID back and this id need to be set in every request. My Problem now is to set the requestHeader.
Client Code
Dim Proxy As 'ProxyClass = New ProxyClass() (Proxy Class is autogenerate by wsdl.exe from VS2005)
dim sessionid as String = Proxy.Login(user, pwd)
-------------------------------------------------
dim test as String = Proxy.OtherFunction
Here i get a exception 'No session startet'
|
|
|
|
|
Hi,
I am not sure exactly about the code, but try to look inside your php code to find the function that return the message 'No session startet', check the condition that triggers that message, if the variable in that condition is readonly (not a public, webservice enabled variable) and you have no right to change the code then it will be so hard to solve the issue
Good luck
|
|
|
|
|
hi everytime i reopen my project things i have writen into it disapear even tho i open and close previous and they are there and other times the code that was there is gone does anyone no why this is happening??
|
|
|
|
|
hi iain6594,
If you need help you need to Provide us with more info. we dont know what VS version you are using?,what OS?, what untivirus ?
please give us more info then we can work from there.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
|
|
|
|
|
im using window xp pro and visual basic express edition
|
|
|
|
|
i Suggest you Download the latest Security Patches, and you should get your self a good antivurus and scan your system unistall visual basic express edition and install it after all the scanning and installation of service packs/security patches. when something happens like that there is a worm.
Hope it helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
How do I populate a textbox in a form from the information on the DataGridView
Matodzi
|
|
|
|
|
hi Matodzi
its Good to hear from a Brother in South Africa,my brother here we Google first before we post, or else you will be ignored.the Following link will lead you to your answer.
http://msdn2.microsoft.com/en-us/library/at23yw2h.aspx[^]
chess
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
|
|
|
|
|
Hi,
It seems you need to get a single value from the selected row, if this is what you want please try the following snippet:
If IsDBNull(dg.Rows(e.RowIndex).Cells(0).Value) Then
TextBox1.Text = "N/A"
Else
TextBox1.Text = dg.Rows(e.RowIndex).Cells(0).Value
End If
* dg = DataGridView
Note: Change 0 to the column index that you want to read from!
hope this helps
|
|
|
|
|
|
hi
normally to display an image image control is required. if we want it on picture button also we can have it.
i have a pic with .jpeg extension of 7mb size. i am trying to display the image in vb.net webform but it is not displaying. but the same pic when i tried in windows forms i used picturebox to display the same pic(it was displayed).
how to do it in webforms.
does the resizing the image does not solve the problem cause the pic is 7mb size.
how to dispaly this picture
there is no such thing as good or bad.
|
|
|
|
|
You could start by checking that the image is in RGB format rather than CYMK - windows can display both but the browser can only display images in RBG format.
|
|
|
|
|
I am making a custom control which inherits from panel. This Control contains a collection field which will build a collection of another control (which also inherits from panel) in the form of List(of T). So far i have created my items (the second panel object) and during design time can go into the collection editor and add multiple items, yet when i close the collection ediotor and reopen it, the items in the collection have disappeared or are not visible in the collection builder anymore.
|
|
|
|
|
if the collection editor is you're first custom control wich contains the list(of T) then this behavior is normal. since you have closed the control containing the collection the collection has been destroyed when you reopen it a new collection (empty) is created.
If you want to keep the items in the collection even after closing it you have 2 options:
1) you save it to a db or file
2) you put the collection (list(of T)) not in you collection editor but in the form that contains the collection editor and when you open the collection editor you then give the list to it (you can do this with a public shared property and a few other methods)
hope this helps
|
|
|
|
|
ok...i sought-of follow you, maybe i should rephrase what i'm actually trying to do. I'm basically trying to add lots of panels to one panel through a collection property. This collection property is: PanelItem is the second control and this property exists on the first control.
Dim p_Collection as List(Of PanelItem)<br />
<br />
Public Property Collection() As List(Of PanelItem)<br />
Get<br />
Return p_collection<br />
End Get<br />
Set(ByVal value As List(Of PanelItem))<br />
p_collection = value<br />
End Set<br />
End Property
Now, when, in design mode, i click the ... button in the collection property of the first control it opens a collection editor, to this i can add, panelitems. Once i have done this and i close it. I then reopen this editor and find that no objects are now in it, yet when i go to add a new one, the number appended to the end automatically begins at 1 past the last one i added previously.
So my questions are:
Why is this happening?
What methods,subs etc do i use without using a database?
How do i get it to function like the treeview Node Collection Editor or similar?
|
|
|
|
|
my first guess would be that you forgot to display the items already in the list. That would result in not being able to see the items but that they are there.
In the load of you're second control (the collection editor) you should put something like this:
if p_collection.count >0 then
for each p as panelitem in p_collection
'display it
next
end if
without more code I can't really be shure about it
if you want to store this collection even after you're application has shutdown you will have to use a database or file or you can look into serialisation (not shure if its spelled correctly )
I'm not familiar with the treeview node collection editor but I'll take a look at it on my break
|
|
|
|
|
no i'm not trying to store a collection after i've shutdown the application, i'm trying to achieve functionality similar to a treeview. Go into a new project and add a treeview to the form, then add to it's nodes property a few nodes, then close the collection editor of the treeview and reopen it, the nodes you added are available to be edited, this is what i'm trying to achieve.
|
|
|
|
|
Ok I took a look at it (first time I did it that way I always do it in code)
I would think that the way you do it should work. Can you provide me with the load of the collection editor or/and constructor. that way I can try to reproduce the error you have and search for a solution
|
|
|
|
|
well what i've already shown you is all i've done, it's not real complex, just two controls that inherit Panel and one has the property i've already shown, in this way it creates its own collecton editor without me having to do it manually, but i'm starting to think that i should be doing it manually, how would i go about that?
|
|
|
|
|
Ok I'v recreated you're problem I'll take a look at it on my break wich is in about 2hours and let you know
|
|
|
|
|
|
Just stumbled on to something. I can't keep myself from trying to solve this (don't know why )
Here is the problem: a panel hasn't got a collection property by default so the collection editor (wich only displays because the property is a list) doesn't know what to do with it.
At first glance I don't think you will be able to achieve that what you want with a panel. Perhaps inheriting from a treeview will work better or a listview. But whitout knowing what exactly this custom control has to accomplish I don't know wich will be better.
Another option is ofcourse to do everything manually but I can't help you with that (haven't done that) and it is probably going to be alot of work. You'll probably have to draw the control you'r self.
If you tell me what functionality you are trying to accomplish perhaps I can help you search for a way to do that
|
|
|
|
|
I just can't stop searching
but I found a possibilaty
to accomplish something like this you have to use a property that already exists in a standerd panel and the only one that exists is the controls property so in you first custom control change you're property to this:
Private p As List(Of mainsub)
Public Overloads Property controls() As List(Of mainsub)
Get
Return p
End Get
Set(ByVal value As List(Of mainsub))
p = value
End Set
End Property
you can change the name of p and of mainsub but not of the property. the property must be controls
if you do this the collection editor will work
hope this helps
-- modified at 5:24 Thursday 30th August, 2007
there still seems to be a problem when you run the prog I take another look at it on my break (really need to get back to work now;P)
|
|
|
|
|
WOW! You've been a great help, haven't had a chance to try this stuff yet and the one below looks helpful also, i agree, it's an annoying puzzle that you hope has a simple answer and wel...it might not but thankyou heaps.
|
|
|
|