.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

domain based webservice connection problem

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :Windows Application
 
When I try to connect domain based webservice from my system getting "The request failed with HTTP status 401: Unauthorized" error .What could be the problem. When i browse the service from browser(http://10.1.23.4/gss/myManagerService.asmx) i can see the service output but when i try to connect from my below programe getting 401 error. Please advice me. MyService service= new MyService (); System.Net.CredentialCache cache = new System.Net.CredentialCache(); cache.Add(new Uri("http://10.1.23.4/gss/myManagerService.asmx"), new System.Net.NetworkCredential("muusername", "mypwd","mydomain")); service.Url = "http://10.1.23.4/gss/myManagerService.asmx"; int cnt = 0; myrec[] records = new myrec[0]; AccRecord oaccRecord = new AccRecord (); DateTime enddt = DateTime.Now; DateTime stdt = DateTime.Now.AddDays(-10); service.Credentials = cache; MessageBox.Show("service"); records =service.ReadRecord(records , stdt, enddt);// here taking some time and throwing 401 eroor


View Complete Post


More Related Resource Links

domain based webservice connection problem

  
When I try to connect domain based  webservice from my application getting "The request failed with HTTP status 401: Unauthorized"  error .What could be the problem. When i browse the service from browser(http://10.1.23.4/gss/myManagerService.asmx) i can see the service output but when i try to connect from my below programe getting 401 error.Please advice me.   MyService service= new MyService ();        System.Net.CredentialCache cache = new System.Net.CredentialCache();        cache.Add(new Uri("http://10.1.23.4/gss/myManagerService.asmx"), new    System.Net.NetworkCredential("muusername", "mypwd","mydomain"));        service.Url = "http://10.1.23.4/gss/myManagerService.asmx";        int cnt = 0;        myrec[] records = new myrec[0];                AccRecord oaccRecord = new AccRecord ();                               DateTime enddt = DateTime.Now;       

domain based webservice connection problem

  
When I try to connect domain based webservice from my system getting "The request failed with HTTP status 401: Unauthorized" error .What could be the problem. When i browse the service from browser(http://10.1.23.4/gss/myManagerService.asmx) i can see the service output but when i try to connect from my below programe getting 401 error. Please advice me. MyService service= new MyService (); System.Net.CredentialCache cache = new System.Net.CredentialCache(); cache.Add(new Uri("http://10.1.23.4/gss/myManagerService.asmx"), new System.Net.NetworkCredential("muusername", "mypwd","mydomain")); service.Url = "http://10.1.23.4/gss/myManagerService.asmx"; int cnt = 0; myrec[] records = new myrec[0]; AccRecord oaccRecord = new AccRecord (); DateTime enddt = DateTime.Now; DateTime stdt = DateTime.Now.AddDays(-10); service.Credentials = cache; MessageBox.Show("service"); records =service.ReadRecord(records , stdt, enddt);// here taking some time and throwing 401 eroor

Having problem using ASMX based webservice on IIS 7.0

  

Hello everybody iam new to .NET and sybase so i need some help on solving the issue.

My project is to make a web app (running fine on XP/ IIS5.0 )compatible with vista and windows 7.I have a delphi desktop application running and is connected to Sybase database now iam working on NET web application which uses a Asmx based webservice to connect to same database .I am not trying to open a new connection rather trying to use (share) the same connection to database opened by delphi desktop application.When i tried using the webservice setup on IIS 7.0  to connect to database i got an error in the browser which follows after the Note:

Note: Runninng on ASP.NET De

Problem making Role based Menu in MVC application

  

Hi,

 I want to make Rolebase menu in MVC such that if user doesnot have permission for some action then that Action name shouldnot be shown in the Menu.

 I have used the code in the url(http://forums.asp.net/t/1566328.aspx) in my MVC application.My application is a Discussion Forum(in MVC) same functionality as in this forum forums.asp.net

 I have used Controllers for post, thread etc.In each controller there are some actions that are using [Authorize(Roles)] attribute

 but this coding does not count  those Actions in Controllers having Authorize attribute according to the url http://forums.asp.net/t/1566328.aspx 

 In the code, Authorize attribute is applied to Controller class, but my requirement is of Applying Authorize attribute to some actions in controller so that some are available for all users and  some links are available rolewise.Now what is the solution for that?

 

Regards

problem with webservice

  

Hi

I wrote a program that connects to a webservice (with client side script such as jquery) and fetches data from  the webservice.

Now the program is working properly in local system, but when I upload it to host, the script cannot connect to the webservice.

What is the problem?


Multiple Submit Connection Problem

  

Hello everyone,

I have an InfoPath form with two Submit Connections. One of them is a regular submit connection to a SharePoint Document Library. The other is a submit connection to the UpdateListItems web Service.

I have one button using rules that submits the forms fields to the Document Library. Some of those fields have data validation rules like entry must be four digits, and field cannot be blank.

The other submit button uses rules to submit an XML template to the UpdateListItems Template. My problem is that even though this second button does not have the first submit connection as an action, the form will still check all of the forms fields to see if they violate the validation rules before it will submit to the Web Service.

How do I tell InfoPath to ignore the validation rules when I only want to submit to the Web Service? I want the user to be able to enter data into the XML template fields and submit to the Web Service, even if some of the rest of the fields are blank. Right now if any of the other fields fail validation it prevents submittal to the web service even if the fields that failed validation are not being submitted to the web service.

Thanks for any advice that can be offered,
Bill Hurt


Problem passing custom object returned by the same webservice among two separate projects

  
I am running into casting issue with this scenario: 1. I made a custom object lets call it EmployeeObject.  2. The Employee object is wrapped in the EmployeeWebservice.  3. I have a client application project lets call it EmployeeClientApplication and a class library called DoSomeWorkClassLibrary.  Both EmployeeClientApplication and DoSomeWorkClassLibrary reference the EmployeeWebService and need to be able to pass the EmployeeObject back and forth.  4. The EmployeeClientApplication also references the DoSomeWorkClassLibrary. 5. The employeeObject in the EmployeeClientApplication becomes EmployeeClientApplication.EmployeeWebService.EmployeeObject. 6. The employeeObject in the DoSomeWorkClassLibrary becomes DoSomeWorkClassLibrary.EmployeeWebService.EmployeeObject. 7. The DoSomeWorkClassLibrary has a method called DoSomeWork that takes an EmployeeObject. When I try to pass employeeObject from EmployeeClientApplication to DoSomeWorkClassLibrary by doing something like this: DoSomeWorkClassLibrary.DoSomeWork(EmployeeClientApplication.EmployeeWebService.EmployeeObject), I am getting Unable to convert EmployeeClientApplication.EmployeeWebService.EmployeeObject to DoSomeWorkClassLibrary.EmployeeWebService.EmployeeObject.  I have searched high and low to fix this issue, I have tried changing the namespace of the reference.cs file of the webservice in

Remoting from WebService throws: An existing connection was forcibly closed by the remote host

  
Hello everyone, I have a problem with using .NET remoting from webservice. When using remoting from console application, there is no problem. I suppose problem is somewhere in IIS. My system is Windows Vista. Thank you for any help. Best regards, Jozef

Excel Connection Manager Problem

  
I am building a package that has 2 tasks that need to use the same excel connection manager. I use a execute sql task to dynamically build a table from the headers of the excel sheet  ,then I use an excel source component to load the data from the sheet. However when I try to edit the excel source and switch the data access mode to a variable and select the variable(for the path), when I try to close the editor I get this message 'S:\myfolder'.  It is already opened exclusively by another user, or you need permission to view its data. I need this package to access the same folder each time because the files will be placed in that folder. This package also has a branch for loading a text file into sql server. It access the same folder but uses a flatfile connection manager It looks like permissions on the folder are correct

Context Connection problem in SQLCLR

  
I am using context connection in the sqlclr (and there are reasons to do so). While a datareader is under execution that uses the context connection, I need another database read passing one of values being read from the datareader. Since I cann't use the context connection for this second read (as context connection is already in use), how can I create a second connection to be used with this second read. I cannot create the hardcoded connections string for the second connection as the database is dynamically selected. The database is same as used by the context connection. I can use the server=localhost though, but cannot hardcode the database name as the database can be different in different sqlclr proc call. However the database is same as used by the context connection. (If I somehow get the database name from the context connection then I can use it to create another connection, but I am expecting an even better solution)   Any solution to this problem? Will be very thankful.

Problem with connection to sql server : A connection was successfully established with the server, b

  
Hi all, I am trying to connect sql server using windows authentication . I am getting the fallowing when I try to establish a connection to sql server A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) Can any one tell me how to resolve this problem..

Connection problem while connecting from client to server.

  
Hello, i am trying to connect sql server 2005 express using c#.net 3.5. my connection string is "Server=.\SQLExpress;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\db_naren.mdf;Database=db_naren; Trusted_Connection=Yes;" this is working fine when i am connecting to sql server from the local machine. When i am trying to connect from someother machine to server it is giving error like A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) i added previliges in add new administrator on SQL Server 2005 Surface Area Configuration . and i made changes on SQL Server 2005 Surface Area Configuration  page, on Database Engine --> Remote Connections -->Local and remote connections --> Using both TCP/IP and named pipelines. still same error i am getting from client machine i am using connection string as "Server=MyServer\SQLExpress;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\db_naren.mdf;Database=db_nare; Trusted_Connection=Yes;" is there any thing i need to do to connect from client machine to server?please

Connection Problem with mysql and asp.net

  
i'm using this string to connect with mysql and asp.net but still agot the connection problem. the connection is not going to open............. i got the following error....... ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified please help me come from this problem "DRIVER={MySQL ODBC 3.51 Driver};DSN=sql4;SERVER=127.0.0.1:3306;DATABASE=myppw; UID=kraft; PASSWORD=myka; OPTION=3"

Web Folder problem : This file cannot be saved to this location because there is no connection to th

  
When I check out a Word 2007 document from a list, I cannot save it back to the server.  I get:   This file cannot be saved to this location because there is no connection to the server.  Check your network connection and try again.   I am using a Virtual Machine (Virtual PC).  I have the Microsoft Loopback adapter installed.    The server has a static IP address and is a domain controller. I am able to access the web folder through Windows Explorer.   How do I set up Office, Sharepoint and Webdav so that I can check files out of sharepoint and save them back, on a virtual machine?

A connection could not be made to the report server - Problem deploying an SSRS report from Business

  
I’m having trouble with what seems to be a common issue for people, regarding deployment of an SSRS report from Business Intelligence Development Studio. Unfortunately none of the solution I have seen posted here (and elsewhere) have been able to help me so far.   Two of my collegaues can both deploy with no problem, and I am using exactly the same Target destinations as them (TargetDataSourceFolder, TargetReportFolder, TargetServerURL).   I have posted the error message below, which from my basic understaning would indicate, I think, a security issue (perhaps something local to my PC, or user account)   Has anyone experienced this particular issue who might be able to help?   Best wishes, Jamie TITLE: Microsoft Report Designer ------------------------------ A connection could not be made to the report server http://turpin-net.turpin-bg.local/Reportserver. ------------------------------ ADDITIONAL INFORMATION: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message: -- <HTML dir="ltr"> <HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta HTTP-EQUIV="Content-Type" content="text/html; c

problem in connection string

  
i have problem in connection strin i host my siteand database is in DATA DIRECTORYmy site run successfully in offline but an error of connection string in online pls give me an example of string for onlinei use asp.net, C# and sqlserver 2005

Upload large file via webservice problem in vb.net 1.1

  
Hi All, I am uploading large file via webservice using below my code in vb.net 1.1. Problem is vb.net 1.1 don't know Using Object loop. I would like to know any other loop similar Using loop to replace in vb.net 1.1Public Function UploadLargeFile(ByVal FileName As String, ByVal buffer As Byte(), ByVal Offset As Long) As Boolean Dim retVal As Boolean = False Try Dim FilePath As String = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory.ToString() & "\fpath\", FileName) If Offset = 0 Then File.Create(FilePath).Close() End If Using fs As New FileStream(FilePath, FileMode.Open, FileAccess.ReadWrite, FileShare.Read) fs.Seek(Offset, SeekOrigin.Begin) fs.Write(buffer, 0, buffer.Length) End Using retVal = True Catch ex As Exception Throw ex End Try Return retVal End Function  
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend