How to use the Default sharepoint credential (DefaultNetworkCredentials )in the C#.

How to use the Default sharepoint credential (DefaultNetworkCredentials )in the C#.
I am using the copy.asmx web service to upload and download the files from sharepoint Document library to .Net application,how to get the Default sharepoint credential from the .net application?

Hello,
YOu can use below line to pass default credential in code: (You can also pass domain,username, password as string if you want)
clientService.Credentials = System.Net.CredentialCache.DefaultCredentials;
http://ktskumar.wordpress.com/2009/03/03/upload-document-from-local-machine-to-sharepoint-library/
http://sharepoint.infoyen.com/2012/02/23/upload-file-in-document-library-with-metadata-inculding-lookup-field-using-sharepoint-web-service/
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

Similar Messages

  • Using the default SharePoint web site in Office 365 with PWA

    Hi, we are testing Project Online for the first time.<o:p></o:p>
    Per default the Project Web App is installed under
    xyz.sharepoint.com/sites/pwa.<o:p></o:p>
    Is it possible, to use it with the standard SharePoint
    team site?<o:p></o:p>
    When I activate Project Online for our default web
    site, a new Instance of the PWA is set up.<o:p></o:p>
    We’d like to use the default PWA instance since it is a menu item in the Office 365 main menu.<o:p></o:p>
    In a getting started video from Microsoft is a sample
    shown, where a task from a team site list can be enhanced to a Project Online
    project. In this case the link from the team web site called the project view
    from the ../sites/pwa instance.<o:p></o:p>
    But I don’t have the function/icon in our team
    website.<o:p></o:p>
    Thanks in advance,<o:p></o:p>
    Marcus<o:p></o:p>

    Hello, if I understand your query correctly the root PWA site has to be PWA site collection, it can't be a default SharePoint team site. The individual project site (below PWA) can start from just a SharePoint team site though or any SharePoint site with
    a tasks list. This can then be added to PWA and converted to a full enterprise project if required or left as SharePoint task list project that can be seen in PWA in visibility mode. Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • Query: how to use structure and selection and what's the difference between

    Query: how to use structure and selection and what's the difference between these two?
    Would be appreciated if some experts here give examples to demenstrate on how to use structure and selection in query and what's the difference between these two?
    Thanks in advance!

    Hi Kevin,
    1. Well by default all the KF that you include in your query go into a Key Figure Structure. You can additionally have another structure for defining how your chars are laid out. A common example is a Calmonth structure where you have selections for 12 months, quarers and YTD values. This would be a char structure with different selections (for each month, qtr etc)
    2. Yes, a selection with a KF is the same as restricting a KF. You can use am RKF is you have one on the left hand side, or if you need to do this locally in the query, right click the structure and choose New Selection, then proceed to choose your KF and reqd char values.
    Hope this helps...

  • How to use workspace in sharepoint?

    How to use workspace in sharepoint?

    Hi Pramod,
    By using out of box functionality this is not possible So you have to write code to
    concatenate the fields.
    I think using SharePoint designer you can concatenate same type of fields not two different type of fields.
    Please cross check on this.
    Hope this will help you.
    Regards
    Soni K

  • HT1695 I know nothing about how to use my new ipod and when reading the little bit of information in the folder that came with it, all I can do is turn it on, but it just powers down after a few seconds.  How do I work this thing?

    I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on.  Then in a few seconds it goes black, never having brought up a screen to do anything!  Help!  What do I do to get this thing going?

    You might consider connecting it to the charger and charging up the battery overnight.
    Please Get the iPod Touch User Manual for iOS 5

  • How to use Forms Default Database Connection in java class

    When a form based application is started, a connection is made with underlying database. This is the Default (Primay) Database Connection.
    The problem is I have some of my business logic implemented in a java class. In this class I have to make a another connection with the same database. What I want to do is to use the original Database Connection in the java class. In this I may avoid the overhead of reconnection.
    Could anyone pls guide me in this way...

    you can't share the forms connection. Sorry :(

  • [svn:bz-trunk] 17772: Update the url in the tests to use a relative path instead of the default localhost : 8400 so that the tests can pass on appservers other than the default Tomcat .

    Revision: 17772
    Revision: 17772
    Author:   [email protected]
    Date:     2010-09-20 15:02:50 -0700 (Mon, 20 Sep 2010)
    Log Message:
    Update the url in the tests to use a relative path instead of the default localhost:8400 so that the tests can pass on appservers other than the default Tomcat.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/EnforceEndpointValidation/Enforc eEndpointValidationFalseTest/Remoting_NetConnectionTest.mxml
        blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/EnforceEndpointValidation/Enforc eEndpointValidationTrueTest/Remoting_NetConnectionTest.mxml

    Revision: 17772
    Revision: 17772
    Author:   [email protected]
    Date:     2010-09-20 15:02:50 -0700 (Mon, 20 Sep 2010)
    Log Message:
    Update the url in the tests to use a relative path instead of the default localhost:8400 so that the tests can pass on appservers other than the default Tomcat.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/EnforceEndpointValidation/Enforc eEndpointValidationFalseTest/Remoting_NetConnectionTest.mxml
        blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/EnforceEndpointValidation/Enforc eEndpointValidationTrueTest/Remoting_NetConnectionTest.mxml

  • How can I remove the default right click option of the text Area control?

    How can I remove the default right click option of the text Area control?
    Is there any way to disable this control in any of the text controls available?

    The iPhone does not store email addresses for received mail. The iPhone stores all email addressees for sent mail in a list of previous recipients. The list of previous recipients is not synced with Outlook or any address book, but the list of previous recipients is included with the iPhone's backup which is updated by iTunes as the first step during the iTunes sync process. The auto-addrss feature pulls from your contacts on the iPhone and from the list of previous recipients.
    Different from the Mail.app on a Mac, there is no access to the list of previous recipients on the iPhone to remove a previous recipient from the list, or to add a previous recipient to contacts that is not already entered - not at the present time anyway.
    The only way to purge the existing list at the present time is by restoring your iPhone with iTunes as a new iPhone or not from your iPhone's backup.
    Hopefully access to the list of previous recipients will be included with the iOS 5 update.

  • How to use a charctersic as a keyfigure in the BEx report

    How to use a charctersic as a keyfigure in the BEx report?

    Hi chandra:
    Please take a look at the document below.
    "How to... Calculate with Attributes"
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc?quicklink=index&overridelayout=true
    Regards,
    Francisco Milán.

  • How to use powershell in sharepoint 2007

    How to use powershell in sharepoint 2007

    SPWeb site = SPContext.Current.Web;
    SPGroup managerGroup = site.Groups["Group Name"];
    bool isManager = site.IsCurrentUserMemberOfGroup(managerGroup);******Please mark as ANSWERED if this helps************
    Thanks Rahul Prabhune

  • HT1267 HAVE SET UP AN INCORRECT EMAIL ADDRESS. The call centre set up a new email address as the Username. I am unable to access the new account because the default on my phone is the email that is incorrect. How do I get the correct email as default

    I HAVE SET UP AN INCORRECT EMAIL ADDRESS. The call centre set up a new email address as the Username. I am unable to access the new account because the default on my phone is the email that is incorrect. How do I get the correct email as default??

    Thank you for your help, much appreciated
    Regards
    Geoff

  • How to use lsmw and load cin details of the customer

    hi,
    how to use lsmw and load CIN details of the customer master data as the CIN DETAILS are not visible under XD01.
    thanx in advance
    regards,
    balajit

    i got the solution

  • How to use "Set Enterprise Call Info" step in the script ?

    Hi all
    Can anyone please suggest how to use "Set Enterprise Call Info" step in the script.
    Does anyone has any example script with the same (a complete example script) ?

    Hi
    go to this guide
    http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx70edgs.pdf
    and see the chapter
    "Designing Scripts for use with the Cisco Application Gateway"

  • How can i change the default sort Arrow Color in the datagrid?

    How can i change the default Sort Arrow Color in the
    datagrid? i didnt found any style properties to change the sort
    arrow color, i know it can be do it in flex 1.5 but how to do it in
    flex2?

    Type about:config in the address bar. Find browser.download.dir and change it to the path you want. Remember that Android has a linux base so the path will similar to /mnt/sdcard/downloads/

Maybe you are looking for