Problem accessing the resource in SP website

I am new to SP and my boss created a sharepoint resources, at let's say abc.sharepoint.com My boss wish to access the resources using a .NET program. My developing computer does not have Windows Server but attempted to use the API by importing referenced founded
in .NET. I used the code which can be found in Google and implemented as follow:
Imports Microsoft.SharePoint.Client
Imports System.Security
Imports System.Net
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim cc As New ClientContext("http://abc.sharepoint.com")
Dim SecureString As New SecureString()
Dim Password = "MyPassword"
For Each c In Password
SecureString.AppendChar(c)
Next
cc.Credentials = New SharePointOnlineCredentials("MyUsername", SecureString)
cc.Load(cc.Web, Function(w) w.title)
Try
cc.ExecuteQuery()
msgbox("Hello World")
Catch ex As Exception
msgbox(ex.Message)
Exit Sub
End Try
End Sub
End Class
I think I could reached the resource but it returns 401 Unauthorized Error. When I use a wrong password, it returns that my login information is incorrect.
What is the reason for appearing 401 and how to solve it. Thanks a lot.

try these links:
http://sharepoint.stackexchange.com/questions/98334/the-remote-server-returned-an-error-401-unauthorized-using-csom-in-asp-net-m
http://sp-thornet.blogspot.in/2014/07/the-remote-server-returned-error-401.html
http://stackoverflow.com/questions/22841115/the-remote-server-returned-an-error-401-unauthorized-using-csom-in-asp-net
Please mark as answer if you find it useful else vote for it if it is close to answer..happy sharepointing

Similar Messages

  • SCOM - -500 Internal Server Error - There is a problem with the resource you are looking for, and it cannot be displayed

    Hi There,
    Need your assistance on the issue that we are facing in prod environment.
    We are able to open web console from remote machine and able to view monitoring pane as well as my workplace folders from console . Able to view and access alerts and other folder in the monitoring pane. We are able to view and access My Workplace folder
    and able to view the reports in Favorite Reports folder. But when I click on run Report we  are getting the below error  "500 Internal Server Error - There is a problem with the resource you are looking for, and it cannot be displayed."
    In our environment we have 3 servers one is SQL server and two are SCOM servers. Please advise how to fix this issue. Do we have to do any thing from SQL End?
    Errors: Event ID 21029: Performance data from the OpsMgr connector could not be collected since opening the shared data failed with error "5L".
     Event ID 6002 : Performance data from the Health Service could not be collected since opening the shared data failed with error 5L (Access is denied.).
    Regards,
    Sanjeev Kumar

    Duplicate thread:
    http://social.technet.microsoft.com/Forums/en-US/7675113e-49f0-4b3a-932b-4aceb3cfa981/scom-500-internal-server-error-there-is-a-problem-with-the-resource-you-are-looking-for-and-it?forum=operationsmanagerreporting
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Safari "you don't have permission to access the resource"

    I'm developing a website in html5 and I'm using <audio> tag and a mp3 remote http://xxx/xxx.mp3 into a "src" attribute.
    <audio id="audio" autoplay controls src="http://xxx/xxx.mp3"></audio>
    When I open this website in Safari on my Macbook, it works but when i'm openning on my iphone, it doesn't work.
    The player is loading and show me the alert: "You don't have permission to access the resource".
    It works  emulating iphone on Safari Developer Menu on my Macbook too.
    What am I doing wrong?
    Can you help me?

    I went to the site on my PC and it is Flash, which iOS devices do not support.
    To check to see if it was Fash because of the PC browser saying it was a PC, I went there on the my iPad, Same, it is was Flash.
    You can try contact the site but I could not find out how to contact them. I would try filling out a dead video report
    http://www.animeflavor.com/node/4327

  • Exchange setup error: "There was a problem accessing the registry on this computer"

     Hi,
    i am trying to install Exchange 2007 SP1 in a Windows 2003 Server standard 32 bits version.
    During the "Readiness checks" i received the next error in "Hub transport role prerequisites":
    Error:
    There was a problem accessing the registry on this computer. This may happen if the Remote Registry service is not running; it may also indicate a network problem.
    Remote Registry service is running. I've searched for the error in google and in some topics appears that the error is due to the "Client for Microsoft Networks" and "File and Printer Sharing" is not installed in the LAN properties. The server has 2 network cards and in both of them is checked. One of the connections is disabled.
    I dont know what more to do, any help will be appreciated.
    Thanks

    No, firewall is disabled.
    Setup Logs says:
    10:50:04.890: Starting Collecting Data phase.
    10:50:04.921: No mapping between account names and security IDs was done
    10:50:04.984: Error (Unexpected error [0x674CBB7E] while executing command '[Microsoft.Win32.RegistryKey]:penRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, [System.Net.Dns]::GetHostEntry([System.Net.Dns]::GetHostName()).HostName)'.) trying to process object [Microsoft.Win32.RegistryKey]:penRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, [System.Net.Dns]::GetHostEntry([System.Net.Dns]::GetHostName()).HostName), skipping object.
    10:50:06.093: Completed Collecting Data phase.
    10:50:06.125: Error (Rule name 'PreReq_fPassiveUninstallNoCMSPresentKey' referenced by rule 'PreReq_fPassiveUninstallNoCMSPresent' in input file is not defined) in format of rules in configuration file.
    10:50:06.171: Starting Postprocessing Rules phase.
    10:50:06.187: Completed Postprocessing Rules phase.
    Thanks for your help!

  • My mouse is unable to access the top toolbar in websites and email with Firefox - this problem does not present in Windows XP or Internet Explorer

    My mouse is unable to connect with the top toolbar of my hotmail account and any other websites I visit using Mozilla as a browser. This problem does not occur when I use Internet Explorer

    The answer was perfect! I fixed the problem following the link. When I posted the question yesterday, I was not very optomistic that anyone would reply and/or help - but, I was wrong. The solution was quick and simple.
    Thanks very much!!

  • Safari Error:cannot connect to server.Was able to click on all tabs within website many times,no issues.Now can't access the"shop" tab within website-What do I do Now?

    Safari and/or internet question:
    I have MacDeskTop W/Intel/OS X Lion 10.8.2   and Safari:Ver6.0.2(8536.26.17)
    Currently I am having a big issue to access within this website's the "SHOP section(tab)" I ca click on the tabs and read the info in each section, except for the "Shop" Tab.
    While in the process of paying for my items in my cart, I received a website message saying something
    To the affect that this website is being updated. Your items in your cart will be in your cart.
    Then the website's screen kicked me out the door.
    A few days later I accessed the main page of this website with no problem.
    I can read the information on the main web page pertaining to items I need to purchase, etc., with no problems.
    I click and maneuver from on one tab to another from the main page within this website with no issues.
    When I click on the "SHOP section(tab)" within this website to complete my purchase.
    Part of this website an error occurs on this "SHOP tab".
    "Safari can't connect to the server".
    Safari can't open the page "https://and the name of this website" because Safari can't connect to the server "www.the name of this website".
    I click on the reload from the view of the toolbar and I can't access this website's"Shop section(tab) at all.
    I e-mailed the webmaster of this website a few times, but no response.
    In the past I was able to access the "Shop section(tab") within this website many times to purchase items with no issues.
    Now I am at my wits end as I really need to complete my purchase from this website.
    I cannot purchase these items from other websites. Only this website.
    So, I really need anyone's tech expertise to help me access the "SHOP" tab within this website.
    I also have another website that i have visited numerous times within the last 6 months with no issues.
    Now I can't access this website at all.
    Safari error: "Safari can't connect to the server".
    I can't figure this out
    No issues with:
    * Comcast tech says that My modem, Wi-Fi connections are fine.
    * Cables and wires and Power strip unit to protect my electronics are fine
    * Utility bill is up to date.
    I have a Mac Desktop 23 inch screen (Purchased 01-01-2013)
                                                      Lion: OS X
                                                      Version 10.8.2
                                                      Processor: 2.7 GHz Intel Core i5
                                                      Memory: 8 GB 1600 MHz  DDR3
    I use Safari: Version 6.0.2 (8536.26.17)
    I use the Mail app that shows a postage stamp with the picture of an eagle 
                                                      It is the Version 6.2 (1499)
    I really need help access the "Shop section(tab)" of the website to complete my purchase.
    What is the next step to fix my dilemma?
    Thank-you all in advance with your expertise, and patience.
    Very Much Appreciated.
    With Kindest Regards
    Mac Desktop, OS X Mountain Lion (10.8), Safari: Version 6.0.2 (8536.26.17)

    Hi There Linc Davis,
    Wow, you are the best.
    Yip this is what the website looks like. Great job Linc Davis.
    Not surprised that the "Shop" tab is missing. Darn.
    Well can you try to access it's "sister" website: astralmusic.com and astralmusicshop.com?
    Since you are awesome with the "Flash" can you investigate if this website has a issue withis this "Flash" too?
    Please Linc Davis

  • Problems with the resources boundles in java studio creator 2

    I try to migrate a proyect from sun java studio creator 2 early access to sun java studio creator 2 but I have a problem, the resource bundle work in creator 2 early access but doesn� work in creator 2, somebody have the same problem?
    and, the most important somebody could fix the problem?
    Note. sorry I�m learning english

    If I choose for SJSC2 to create JSF applications then
    one, or better THE, reason is the (drag and drop)
    Design editor functionality.
    Using resource bundles is a MUST. So if this means I
    cannot use the Design Editor in combination with
    resource bundles, then I will use something else...
    I think there should be a statement issued by the
    SJSC2 team about this bug and what the timescale for
    a decent solution wll be.
    Regards,
    Marcel
    BTW: overall SJSC2 seems to be a good alternative to
    develop an open source JSF application in a competing
    timeframe.I agree. This bug is even more exacerbated by the fact that the error message is entered in the design form and generally clutters more room than was originally intented for the text. Not having i18n is a show stopper right now. Creator2 will have to fully support i18n before we can start using it.

  • I cannot access the cpanel of my website

    I have a personal website, but I cannot access the cpanel (http://www.*insertaddresshere*.co.uk/cpanel) or (http://*insertaddresshere*.co.uk:2082/)
    Firefox does not even give an error, it just shows a blank white page and says 'done' in the status bar.
    I am running Firefox 3.6 (Latest release) on Mac OS X Snow Leopard.
    == URL of affected sites ==
    http://

    yes definately fiefox. I am having the same problem. It seems it is related to Javascript. I have tried disabling all addons I am using 3.66 and I am not sue where the error occurred. Cpanel works in IE and Chrome

  • Can't access the content on my website server

    I recently installed an Airport Extreme router in place of a Linksys wired router. I access two outside servers connecting with FTP Transmit - one server is my local ISP on which I have 5 mg personal space and I can access this still with no problem. I also have space for my club website on another server (which I am told is probably more secure than my ISPs) and since installing Airport Extreme I am no longer able to access the files in order to update the content.
    I was able to access this server from my local library's Wi Fi so feel it must be the new router which is causing the problem.
    Does anyone know what settings I could change to remedy this problem?

    Problem resolved. AE was disabled and Airport Utility said resolution was to install update 7.5.2 which I had not done because of all the negative postings here. Didn't have much choice so installed update. Was immediately able to access my club website server!!

  • Is anybody else experiencing problems accessing the itunes store?

    i'm on a macbook pro 10.6.8. my itunes is 10.3.1. i haven't experienced problems before, just today when i was trying to update some iphone apps.  the updates wouldn't download and it kept giving me the network timeout error.  i checked my connection and everything is working, so it's clearly not a network problem.  i also tried logging on to the app store app, and it wouldn't let me. i always get the error connection failed.  i am however logged in via itunes.  i just couldn't update apps or browse my account info, etc.
    i couldn't access the itunes/app store on my iphone either.
    i also browsed the various topics on here, which were similar to what i was experiencing and have tried the fixes offered but have had no luck so far.  i was wondering if anyone else is experiencing this problem right now? most of the topics i read date as far back at 2007-2008 =/
    any help/info would be appreciated.  thank you!

    Hey
    I'm french, so sorry for my bad english and I hope you understand.
    So, I've got the same problem now, since 11:30pm (it's 0:34am now) and I can't buy any apps or update them.
    I live in France, I don't know where you're living but it seems to be a "worldwide problem"...
    I'm waiting some answers, but I'm affraid that it an Apple's servers Error. The app store doesn't work on iOS (iphone 4 / 4.3.3) iTunes (MacOSX 10.6.8 iTunes 10.3.1) and on the Mac App Store too (1.0.2)
    So wait and see....
    [Update]
    Now I can listen songs's extract and download Podcasts. But for the apps of App Store and Mac App Store. It's also the same thing...

  • Problem Accessing the iSQPlus in Oracle 10g

    Hi,
    What is the possible cause of this problem: Can't access the iSQLPlus in the browser.
    Message was edited by:
    knight

    What's your OS? and Oracle version?
    Make sure the isqlplus service is up and running. Next check you have not firewall issues.

  • Help,Intermittent problems accessing the Editor in Elements 10

    Sometimes when I try to access the Editor,either  from the Organizer or directly, it will let me in and I can then edit several images, without any problems. Then without warning it fails, and I cannot access the Editor in any of the editing Modes. The only way I have been able to to overcome the problem is to come out of Elements and  Reboot my PC, then re enter Elements and start afresh.
    I am using a Sony Vaio PC with wndows7 Home Premium, and AVG security. I have also fairly recently installed a Bambo Pen and Touch tablet, but I think the problem stems back from before that installation.
    I am not very "computer literate" but any help or suggestions will be much appreciated.
    John.

    Try this:
    Bypass the Unwelcome Screen by creating Desktop shortcuts for the Organizer and the Editor, and restarting your computer.
    The Editor's executable is:
    "C:\Program Files (x86)\Adobe\Photoshop Elements 10\PhotoshopElementsEditor.exe"
    The Organizer's executable is:
    "C:\Program Files (x86)\Adobe\Elements 10 Organizer\PhotoshopElementsOrganizer.exe"
    The Unwelcome Screen leaves a zombie process running which prevents the actual program from launching again.
    Ken

  • Problem accessing company resources remotely using Cisco VPN Client

    I connect to my company's network remotely using Cisco VPN client both from a PC (v 4.0.1) and from a MacBook Pro (v 4.9.00)(same configs), and use Remote Desktop to connect to my work computer, and now i'm able to use Citrix to run applications on the company server.
    The problem occurs on the Mac when I'm connecting from a location that uses the same private domain IP as our company's private domain. Our company's private domain is 192.168.1.x, so when I'm using the Mac on a WiFi router that happens to be set to 192.168.1.1, the Mac can connect using VPN but the remote desktop cannot connect to my work computer. Presumably, the Mac doesn't "know" that I'm trying to go through the VPN for the connection and not connect to something locally.
    This problem seems to be unique to the Mac. Every Windows machine with the same client installed has no problems no matter what WiFi I've tried. The Mac works fine on any WiFi that is not 192.168.1.x.
    However, since 192.168.1.x is very common (hotels, airports, etc., its a major problem with the Mac.
    Suggestions are greatly appreciated!
    Also, now that we're moving to Citrix, our administrator has created a webpage on the intranet that we launch applications from, but the Mac cannot find that page when connected to VPN from 192.168.1.x. Same problem.
    Thanks in advance.

    Hi,
    I presume you have split-tunneling activated.
    1. Make sure the 192.168.1.x is on the protected networks and on the MacBook client, disable "Allow local LAN access"
    2. Create a separate group for the Mac users and assgn them a different pool (192.168.100.x )and advertise it in your company to point to the VPN Concentrator.
    3. Use the NAT feature on your VPN concentrator.
    If this helped, please rate.
    Regards,
    Daniel

  • Having problem access the EJB 3 from Web Component

    Hi ,
    I have an EJB 3 entity AuctionItem and a session ItemProcessor only implements the local interface IItemProcessor, then I use a servlet to access the findAll method in the ItemProcessor. I've created a Enterprise Applicaiton project to contain the ejb jar and the war file, but after I deploy the ear successfully, I couldn't access to my servlet through http://localhost:8080/AuctionWeb/AuctionServlet, it keeps giving me error like follwoing. Do you know why, your help will be very appreciated !
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.lang.NullPointerException
         at web.AuctionServlet.doGet(AuctionServlet.java:43)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    My code sample:
    public class AuctionServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
          @EJB
             private IItemProcessor itemProcessor;
         public AuctionServlet() {
              super();
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet AuctionServlet</title>");
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet AuctionServlet at " + request.getContextPath () + "</h1>");
            List items = itemProcessor.findAll();
           for (Iterator it = items.iterator(); it.hasNext();) {
            AuctionItem elem = (AuctionItem) it.next();
           out.println(" <b>"+elem.getItemid()+" </b><br />");
           out.println(elem.getTitle()+"<br /> ");
            out.println("</body>");
            out.println("</html>");
    .....And the session bean is :
    package sessions;
    import javax.annotation.Resource;
    import javax.ejb.Local;
    import javax.ejb.Stateless;
    import javax.persistence.*;
    import javax.sql.DataSource;
    import java.util.List;
    import entities.AuctionItem;
    @Stateless(name = "ItemProcessor")
    public class ItemProcessor implements sessions.IItemProcessor {
         @PersistenceContext
         EntityManager entityManager;
         public Long createItem(String title, Double value, String description,
                   String status) {
              AuctionItem item = new AuctionItem();
              item.setTitle(title);
              item.setValue(value);
              item.setDescription(description);
              item.setStatus(status);
              entityManager.persist(item);
              return item.getItemid();
         public String findItemByKey(Long id) {
              AuctionItem item = entityManager.find(AuctionItem.class, id);
              return item.getTitle();
         public List findAll() {
            return  entityManager.createQuery("select object(o) from AuctionItem as o").getResultList();
    }

    The most common reason for this failure is if your web.xml does not refer to the latest web application
    .xsd :
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http
    ://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/x
    ml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    Otherwise, the web application is considered to be a J2EE 1.4 application and annotations
    are not processed. If that's not the case you can also run the application through the
    verifier to see if it identifies any issues.

  • Problems accessing the manufacrurer dll

    I am trying to communicatete a Gigahertz-Optik optometer using dll file provided by the manufacturer. I have Labview 7.1 and operating on Windows 2000. After a proper function is selected in the "Call library Node" and excpected assignments done, the program crashes.
     The error message reads, "An exception occurred within the external code called by a Call
    Library Node. This may have corrupted LabVIEW's memory. You should save
    any work to a new location and restart LabVIEW. VI "xyz.vi" was stopped
    at Call Library Function Node 0x448 of subVI "called-function.vi" ".
    I have attached my program and a header file provided by the manufacturer. ANy help would be appreciated.
    Attachments:
    HCT99HID.H ‏8 KB
    Optometer Library Function Call-Open USB.vi ‏14 KB

    Can't access the DLL, but my guess is that it's because you're not providing a string to use as the buffer for the error message. Unless the DLL creates this dynamically, it's probably expecting you to pass in a buffer. I would try wiring in a string of adequate length. I would also change the parameter from LStrHandle to just a C string pointer.
    I would strongly suggest that you should look at the shipping examples, as there's a very good example that shows you how to call functions in a DLL using a variety of parameters.

Maybe you are looking for