| |

VerySource

 Forgot password?
 Register
Search
View: 653|Reply: 1

How to use EnableSession?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-10 20:20:01
| Show all posts |Read mode
I designed a WEB SERVICE and called it through WINFORM. In the WEB METHOD, ENABLESESSION is set to TRUE. There is no problem in the browser debugging through the WEB SERVIE, but it is always unsuccessful when called through WINFORM.
Reply

Use magic Report

0

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-6-17 17:15:01
| Show all posts
The winform client must execute the following code:
  ser1 = New localhost.Service1'This is a web service object
  ser1.CookieContainer = New System.Net.CookieContainer'This is very important
In this way, the session use on the server side is no problem, IIS default session expiration time is 20 minutes.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list