开发者

Webservice returning 403 error

I'm wondering whether I'm receiving the 403 errors because there are too many attempted connections being made to the webservice. If this is the case how do I get around it? I've tried creating a new instance of InternalWebService each time and disposing of the old one but I get the same problem. I've disabled the firewall and the webservice is located locally at the moment. I beginning to think it may be a problem with the credentials but the control tree is populated via the webservice at some stage. If I browse to the webmethods in my browser I can run them all.

I return an instance of the webservice from my login handler loginsession.cs:

static LoginSession()
{
    ...
    g_NavigatorWebService = new InternalWebService();
    g_NavigatorWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;
    ...
}       

public static InternalWebService NavigatorWebService
{
    get
    {
        return g_NavigatorWebService;
    }
}

I have a tree view control which uses the webservice to populate itself. IncidentTreeViewControl.cs:

public IncidentTreeView()
{
    InitializeComponent();
    m_WebService    = LoginSession.NavigatorWebService;
    ...
}
public void P开发者_如何学Pythonopulate()
{
    m_WebService.BeginGetIncidentSummaryByCompany(new AsyncCallback(IncidentSummaryByClientComplete), null);
    m_WebService.BeginGetIncidentSummaryByDepartment(new AsyncCallback(IncidentSummaryByDepartmentComplete), null);
    ...
}
private void IncidentSummaryByClientComplete(IAsyncResult ar)
{
    MyTypedDataSet data = m_WebService.EndGetIncidentSummaryByCompany(ar); //403
    ..cont...
}

I'm getting the 403 on the last line.


Do you know the sub-code of 403 ? Only 403-9 and 403-15 seem to be related to too much traffic, which is itself related to your licence, so there is nothing that can be done about this, except buy new licences or reduce the amount of requests.

But other sub-codes of 403 are more related to authorization, which may be a more likely reason for your problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜