1

i have deploye my ashx service.when i try to access it using belwo code i got error 401 Unauthorised

System.Net.WebClient webClient = new System.Net.WebClient();

                    webClient.UseDefaultCredentials = true;

                    webClient.OpenWriteCompleted += (s, evt) =>
                    {

                        try
                        {

                            UploadFileData(FsInputFile, evt.Result);

                            evt.Result.Close();
                            FsInputFile.Close();
                        }
                        catch (System.Net.WebException webEx)
                        {  

//show message }

                    };


                    webClient.OpenWriteAsync(handlerUrl.Uri);

i have deployed this ashx along with WCF service.WCF service is allowed to access fro window authentication only.

can any one tell what should i change to access this handler?

0 Answers0