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


Post New Web Links

how to pass sharepoint webservice credentials without hardcoding the credentials?

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :SharePoint
 
Hi,         i have a requirement where i need to use lists.asmx webservices. whenever an item is created in  announcement list on server A, its reference i.e. the item id needs to be added to the announcement list on server B. i got this done working, but i hardcoded the credentials for the webservice. something like this cmoss2.Lists StudentList = new cmoss2.Lists(); StudentList.Credentials = new System.Net.NetworkCredential("administrator", "admin1234", "myDomain"); StudentList.Url = "http://cmoss:6789/_vti_bin/lists.asmx"; cant we do this with out hardcoding the credentials? kindly suggest me, if there is any workaround. Thank you all  


View Complete Post


More Related Resource Links

Unable to pass default network credentials from a .NET / SharePoint application to Web Services

  

Require some help in passing the authentication of a logged-in user to a web services (which is a wsdl file added as web reference to the application) from an ASP.NET application/ SharePoint 2010 portal. When the application calls the web service, the default network credentials need to be passed to the web service to get authenticated to use the data repository. This web service is used for searching a data repository depending on the logged in user's credentials and search query.

We have made necessary changes required in the applications like.

Necessary changes in web.config (like authentication mode to Windows, impersonation is made true). Install client certificates to the trusted location.

Enable IE 8.0 to use Integrated Windows authentication (Internet Explorer -->Tools-->Internet Options -->Advanced--> Security --> Enable Integrated Windows Authentication.

Unable to pass default network credentials from a .NET / SharePoint application to Web Services

  

Require some help in passing the authentication of a logged-in user to a web services (which is a wsdl file added as web reference to the application) from an ASP.NET application/ SharePoint 2010 portal. When the application calls the web service, the default network credentials need to be passed to the web service to get authenticated to use the data repository. This web service is used for searching a data repository depending on the logged in user's credentials and search query.

We have made necessary changes required in the applications like.

Necessary changes in web.config (like authentication mode to Windows, impersonation is made true). Install client certificates to the trusted location.

Enable IE 8.0 to use Integrated Windows authentication (Internet Explorer -->Tools-->Internet Options -->Advanced--> Security --> Enable Integrated Windows Authentication.

Even the web services have methods to get the windows network credentials. While trying the following code, to pass current credentials, default credentials is empty.

myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials (Here it is a null value)

Application is using Windows Authentication | NTLM.

The following code works, if the authenticat

Pass virtual directory credentials through application

  
Hi All,We have created a website and for the secured files created a virtual directory and in virtual directory properties we selected Application-user(pass through authentication).If any user directly browse the files link then the browser prompts a screen for virtual directory credentials.Here my requirement is i need to send the virtual directory credentials through the application.Please let me know.Thanking You..

Sharepoint Designer repeatedly prompts for credentials

  
When I try to access SharePoint Designer 2010, I am repeatedly prompted to enter my credentials. I am running on a Windows 7 64 bit machine (in "Developer mode"). I select the designer from the home page from the site actions menu. I tried this solution, as this is exactly my problem, but it didn't work; http://support.microsoft.com/kb/982948 I have been searching for this issue but to no avail Thanks

Passing credentials from Sharepoint application to Reporting Server

  
Hi, Think of an environment where SSRS is deployed in share point integrated mode. There is a sharepoint application which is using user authentication (not windows authentication) for validating the login credentials of users using the application. There are some reports presented as web parts in the sharepoint application. Now, how should the user credentials be passed from Sharepoint application to Reporting services and how should they be validated? How the user credentials from sharepoint to be passed to report server and validate the permissions before showing up the report? Please let me know.  Phani Note: Please mark the post as answered if it answers your question.

SSRS DataSource as XML (Using WebService) Error: Credentials

  
Hello all, I have a requirement in which i have to generate reports (using SSRS) with my Sharepoint list as Data Source. This can be done by consuming the web services in my SSRS, by providing the connection string and Type = XML. My connection string when browsed in browser, "http://<server name>/_vti_bin/lists.asmx" gives me the *method lists* in the <server name>.. which is fine. However when this is used in my DataSource in SSRS, i get the following error: "You might not have permission to view this directory or page using the credentials that you supplied. The Web server has a filter installed to verify users connecting to the server and it failed to authenticate your credentials." :( In the credentials tab, i am using the "Windows Authenticated"   Any help is highly appreciated. :)

Server 2003 prompting for credentials when connection to Sharepoint document library via UNC

  
Hi all

I have a sharepoint document library http://mycompany/sites/documentLibrary. When browsing to this site through Internet Explorer on a terminal server I can get to the site without being prompted for a username and password, which is what I want. The site appears as "local intranet"  according to IE.

When browsing to the UNC path \\mycompany\sites\documentLibrary we are being prompted for a username and password. After putting in the credentials the document library displays. I need for the server to be able to access the site via UNC path without being prompted for credentials as we have several in house applications relying on doing so

The funny thing is this was working until recently. What's changed? I have no idea. I have an almost identical terminal server on the same subnet/OS/windows patch level that allows access without prompting for a username or password, and the only thing I had to do for that server was enable the web client service..

Things I have tried so far:

- Checked the Web Client service is enabled, started and set to automatic. Restarted the server just to make sure.
- Added http://mycompany, \\mycompany etc to the trusted zone.
- Set the truste

Sharepoint 2010, Constant prompt for credentials to edit office documents in a fqdn setup

  

Is there a solution to resolve the constant "Prompts" For user id's and passwords when a person tries to open/launch/edit office documents from sharepoint 2010.

My setup: sharepoint fqdn in the domain sp.domainname.local, The sharepoint server is a member of this internal domain. In dns I have local zone of sp.domainname.com with a cname that points to the internal sharepoint server. There is no issue in users accessing the server both internal and external, The issue arises when Office documents are launched from SP2010.

In central admin I have configured the alternate access mappings to be http://sp

I have also tried putting the fqdn dns name of the sharepoint server in IE8 trusted zone but
no luck, I still get credential prompts.

I think the issue might be that Office does not see that the files are coming from the fqdn of sp.domainname.com so hence the prompts.

Trying to fix this as right now its a total pita. I found some previous posts on this issue with SP2007 but found nothing that really addresses this in SP2010.

Thanks Paul


How to get Email of Current User Data View Web Part Sharepoint 2010 and pass to WebService data sour

  
I have to pass in the email address of the current user to a web service data source (run time) of a Data View Web Part.

My Question is:

a) How can I get Email address of current user based  in DVWP.
I know we can get the CurrentUser using the CurrentUserName but how do we get the Email for the Current User.

b) After getting the Email how do we pass to the Web Service.


Executing SharePoint console application without sharing user credentials

  

I have a console application, which uses SharePoint object model to do some business operation, therefore it has been deployed on SharePoint server. Without sharing username/pwd, earlier we allow several users to access this console application by providing remote desktop file (.rdp) file. This .rdp file (ver5.1) contains username and encrypted password. With recent version 6.0 of .rdp, it still prompts for password. You may argue that it is due to security constraint.

What is the best approach to allow more users to run this console application without sharing user credentials, without modifying the console application.

Thanks in advance

 

J Justin

 


How to pass credentials from Visual Web Developer to Reporting Services

  

Hi, 

I have a SQL Server 2005 database with Windows Credentials. I am trying to pass my credentials from Visual Web Developer to my report but it returns me: "Cannot create a connection to data source". 

How I have to pass the credentials to the report? 


Best Wishes, Arbi --- Please vote if you find this posting was helpful or Mark it as answered.

How to pass credentials from Visual Web Developer to Reporting Services

  

Hi, 

I have a SQL Server 2005 database with Windows Credentials. I am trying to pass my credentials from Visual Web Developer to my report but it returns me: "Cannot create a connection to data source". My web application is based on Windows login as well.

How I have to pass the credentials to the report?


How to check (login Credentials) user name and password to access sharepoint server 2007 programmati

  
my issue is...

while user entered his/her Username:xyz
                                      password:abcd
i need to check programmatically either username & password exists ot not in sharepoint server 2007 from windows form application.

and i know how to check username,but i don't know how to check password.

you can check username in below ways..

 SPSite SharepointSiteObj = new SPSite(SiteUrl);
 SPWeb SharepointWebObj = SharepointSiteObj.OpenWeb("/");

 SPUserToken token=SharepointWebObj.AllUsers[userName]

from this i can get user name..

BUT I DON'T KNOW HOW TO CHECK USER PASSWORD....

PLEASE GIVE YOUR VALUBLE SUGGESTIONS AND SOME COADING..

THANKS FOR ANY HELP:
jilani

sharepoint displays white screen when wrong credentials are entered

  

When user enters invalid credentials sharepoint 2010 displays white screen.

Insted of this i want it to display default Accessdenied page.

I tried below solution

<

 

 

httpErrors

Prompted for network credentials via internet while accessing SSRS reports in SharePoint integrated

  
Hi

We have developed a SharePoint- FBA site and published it through ISA.  The site, among many features, displays SSRS reports through Performance Point Monitoring dashboards.  SSRS is using windows integrated authentication (Kerberos).  Through intranet, the reports are getting displayed without any issue, but, through internet, its getting prompted when we try to access the reports for the first time after logging into the site using FBA credentials.  When we enter valid domain credentials after being prompted, it starts displaying reports without any issues and never prompts again for that FBA session.

We have been trying to eliminate the prompt through internet, but couldn't do so. 

Has anyone experienced the same before?

Any help is appreciated.


HttpWebRequest using SharePoint System account credentials

  

I am working on some SharePoint 2010 server-side code, which uses the Client Object Model (to connect to remote farms)... I can use the impersonated user account easily enough, but in some cases I need to use the local farm's SYSTEM account... unfortunately, when I try to encapulate code within an SPSecurity.RunWithElevatedPrivileges block, I cannot find a way to impersonate the app pool service account.

How can I access the SYSTEM account's iCredentials? (whether for the SharePoint client API, an HttpWebRequest, or anything else)

 

The closest I seem to be able to get is within a RunWithElevatedPrivileges block, I can get the System.Security.Principal.WindowsIdentity.GetCurrent() which returns the SYSTEM account, but I'm not sure how to use that to obtain the iCredentials object.


 


How do I pass username/password credentials from php client to self-hosted wcf service?

  
I have a self-hosted wcf service that just adds 2 numbers and returns the value.  It works fine, but I am not sure how I can send the username and password through the php client, so it will validate against my CustomUserNamePasswordValidator.  Here is the implementation for the Add Method:

  
public class MathService : IMathService
  {
    public double Add(double x, double y)
    {
      return x + y;
    }
  }


Here is my current App.Config:

   
<?xml version="1.0" encoding="utf-8" ?>
  
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