Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Console Application crashes on SharePoint 2010 Production

$
0
0

Hi

I have a console application to migrate pdf files from database to SharePoint document library. It works great on my development machine and test server(one web/app server and one database server). However when I run this on our production enviornment web1 server (there are 2 web server and 1 app server), it crashes after taking input of SharePoint URL. Is this because production has hosted site collection name and single url. what url I need to type? so far I tried with actual web server name/hostedurlname/ipaddress and every scenario its crashing.

Console.WriteLine("Enter SharePoint Site URL [Ex: http://sharepointtest ]");
            mySharePointURL = Console.ReadLine();

 //As soon as I type the url and hit enter, console application crashes.

                   
            using (SPSite site = new SPSite(mySharePointURL))
            {
                using (SPWeb web = site.OpenWeb())

Please help.

               


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>