Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: Changing tab appearance on mouse enter Pin
gUrM33T30-Apr-04 15:25
gUrM33T30-Apr-04 15:25 
GeneralDotNetScriptEngine.exe Pin
Mike Hooper30-Apr-04 8:36
Mike Hooper30-Apr-04 8:36 
GeneralRe: DotNetScriptEngine.exe Pin
Nick Parker30-Apr-04 11:38
protectorNick Parker30-Apr-04 11:38 
GeneralRe: DotNetScriptEngine.exe Pin
CWIZO30-Apr-04 20:53
CWIZO30-Apr-04 20:53 
QuestionHow to enter array in windows form Pin
brugi8230-Apr-04 8:21
brugi8230-Apr-04 8:21 
AnswerRe: How to enter array in windows form Pin
Judah Gabriel Himango30-Apr-04 8:37
sponsorJudah Gabriel Himango30-Apr-04 8:37 
GeneralRe: How to enter array in windows form Pin
brugi8230-Apr-04 23:38
brugi8230-Apr-04 23:38 
GeneralHTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
Crank Ninja30-Apr-04 7:50
Crank Ninja30-Apr-04 7:50 
Hi all,
I wrote a simple ASP.NET Web Services as follow:


///SERVERCODE <br />
<br />
[WebMethod(EnableSession =true)] <br />
public bool Login(string username, string password) <br />
{ <br />
    Session["userid"]=username; <br />
    /* <br />
     Some non important lines of code here<br />
     */ <br />
    return true; <br />
} <br />
<br />
public string WhoAmI() <br />
{ <br />
    return (string) Session["userid"]; <br />
} 


Then I wrote a simple Windows form with 2 textboxs for username and password, 2 buttons for the function Login and WhoAmI. The code looks like following

//CLIENT CODE <br />
<br />
public class Form() <br />
{ <br />
   //create a proxy class to the Web Services<br />
<br />
   private MyWebServices m_proxy = new MyWebServices; <br />
<br />
   /*Auto Generated code for Windows Form */ <br />
<br />
<br />
   //Login button click event<br />
   public void Login_click (object sender, EventArg eventArg)  <br />
   { <br />
       m_proxy.CookieContainer = new System.Net.CookieContainer(); <br />
       if (m_proxy.Login()) <br />
       { <br />
           MessageBox.Show("Login Success"); <br />
       } <br />
        else <br />
           MessageBox.Show("Login Fail"); <br />
<br />
   } <br />
<br />
    //WhoAmI button click event<br />
    public void WhoAmI_click(object sender, EventArg eventArg) <br />
    { <br />
         MessageBox.Show("Hello, you are "+m_proxy.WhoAmI()); <br />
    } <br />
<br />
} 


The problem is that, when I open more than 10 clients, and click on button Login on each Windows Form client (with different username and password), the 11th client throws an exception with HTTP Error 403 code: Access forbidden.

This means that my Web Services can not be accessed by more than 10 clients at a time. This really stupid, but I don't know why, and how to solve this problem.

Any help will be appreciated.
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
Dave Kreskowiak30-Apr-04 8:38
mveDave Kreskowiak30-Apr-04 8:38 
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
Jeff Varszegi30-Apr-04 8:45
professionalJeff Varszegi30-Apr-04 8:45 
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
Dave Kreskowiak30-Apr-04 11:47
mveDave Kreskowiak30-Apr-04 11:47 
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
Daniel Turini30-Apr-04 12:59
Daniel Turini30-Apr-04 12:59 
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
Jeff Varszegi30-Apr-04 13:37
professionalJeff Varszegi30-Apr-04 13:37 
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
Dave Kreskowiak30-Apr-04 18:58
mveDave Kreskowiak30-Apr-04 18:58 
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
leppie30-Apr-04 12:33
leppie30-Apr-04 12:33 
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
Dave Kreskowiak30-Apr-04 18:50
mveDave Kreskowiak30-Apr-04 18:50 
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
leppie30-Apr-04 20:51
leppie30-Apr-04 20:51 
GeneralRe: HTTP Error 403 when connecting to ASP.NET Web Services more than 10 clients Pin
Crank Ninja30-Apr-04 17:06
Crank Ninja30-Apr-04 17:06 
GeneralAxWebBrowser onclick event handler disabled some default behavior on AxWebBrowser/MSHTML Pin
skywatcher30-Apr-04 5:54
skywatcher30-Apr-04 5:54 
GeneralDynamic Size Pin
sreejith ss nair30-Apr-04 3:23
sreejith ss nair30-Apr-04 3:23 
GeneralRe: Dynamic Size Pin
sreejith ss nair30-Apr-04 3:41
sreejith ss nair30-Apr-04 3:41 
Questionhow can i disable the toolbar and menu bar in IE6 Pin
robmays30-Apr-04 2:18
robmays30-Apr-04 2:18 
AnswerRe: how can i disable the toolbar and menu bar in IE6 Pin
Heath Stewart30-Apr-04 3:51
protectorHeath Stewart30-Apr-04 3:51 
GeneralSearch MyFileName*.* file Pin
wk_vigorous30-Apr-04 1:21
wk_vigorous30-Apr-04 1:21 
GeneralRe: Search MyFileName*.* file Pin
Colin Angus Mackay30-Apr-04 1:33
Colin Angus Mackay30-Apr-04 1:33 

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.