473,385 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

.NET Console connect to STS over SSL?

Hi, I am trying to write a sample console app which
enumerates the lists for a sharepoint team services site.
The site does not allow anonymous and uses windows
integrated security.

My code works fine over "http" but as soon as I try to
address the "https" SSL site, then the initial
SPSite.RootWeb call fails.

By the way, I am using host headers and in the Sharepoint
admin tool the SSL site displays using the machine name
rather than the host header -- don't know if that is a
problem because use of the site is not impacted. There is
only one SSL site on the server. Also, to my knowledge,
the IIS is not running in IIS5 compat mode.

Can someone please help me understand what I need to do
to avoid the following error?

Unhandled Exception: Microsoft.SharePoint.SPException:
The server instance specified was not found. Please
specify the server's address and port.
at Microsoft.SharePoint.g.a(Boolean A_0, String A_1,
Guid A_2, Int32& A_3)
at Microsoft.SharePoint.g.a(Boolean A_0, String A_1,
Guid A_2, Int32& A_3)
at Microsoft.SharePoint.SPSite.k()
at Microsoft.SharePoint.SPSite.get_ServerRelativeUrl( )
at Microsoft.SharePoint.SPSite.get_RootWeb()
at ConsoleApplication1.Class1.Main(String[] args) in
c:\visual studio projects\distributors\consoleapplication1
\class1.cs:line 20

Here is my code:
[STAThread]
static void Main(string[] args)
{
SPSite siteCollection = new SPSite
(ConfigurationSettings.AppSettings["url"]);
SPWeb site = siteCollection.RootWeb;

SPList list = site.Lists["Contacts"];
Console.WriteLine("List: " + list.Title);

foreach (SPListItem item in list.Items)
{
Console.WriteLine(item["Title"]);
}

Console.WriteLine("Press ENTER to continue");
Console.ReadLine();
}
Jul 21 '05 #1
3 2624
Hi Jennifer,

Thanks for your post. I will ask one who is expertise on SharePoint Server
to check this issue and reply to this thread.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2
We are working with Jennifer offline to reproduce this problem.

John Eikanger
Microsoft Developer Support
--------------------
| From: ti******@online.microsoft.com (Tian Min Huang)
| Organization: Microsoft
| Date: Wed, 26 Nov 2003 07:51:57 GMT
| Subject: RE: .NET Console connect to STS over SSL?
| Newsgroups: microsoft.public.dotnet.general
|
| Hi Jennifer,
|
| Thanks for your post. I will ask one who is expertise on SharePoint
Server
| to check this issue and reply to this thread.
|
| Have a nice day!
|
| Regards,
|
| HuangTM
| Microsoft Online Partner Support
| MCSE/MCSD
|
| Get Secure! -- www.microsoft.com/security
| This posting is provided "as is" with no warranties and confers no rights.
|
|

Jul 21 '05 #3
Hello Jennifer,
I am investigating this case and had sent you an email earlier I am not
sure if you received that.
I had a couple questions for you regarding your environment.
1. Is this application running on the server itself?
2. Can you describe in a little detail how your ssl set up is and the steps
you take then you say you run it over SSL.

This will help me recreate the problem here and debug it.
One thing to try will be to get a netmon trace while running your
application and see what user you are running your application as in the
SSL environment and if the right user is getting passed across.

Let me know if you have any further questions regarding this at any time.
Thanks

Rohit Puri
Microsoft.

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: athens.gr. | last post by:
VIRTUALIZATION ENGINE CONSOLE A RUNTIME 1.1 - IBM (3 CDs), WEBSPHERE BUSINESS INTEGRATION CONNECT ADVANCED v4.2.2 - IBM, other 16,000 more CDs, (free donge)! No time limitation! ...
2
by: Thomas M. | last post by:
Greetings everybody! I have a short but hopefully simple question. If anybody can give me some direction, I would greatly appreciate it. I am in the process of writing a small console utility...
3
by: yaron | last post by:
Hi, 1. How to use SSL to connect 2 c# console application clients ? 2. Ineroperability with Java : How to use SSL to connect C# console application client and JAVA console application client...
1
by: Teis Draiby | last post by:
I am working on a Win32 program with an additional console window to output messages. I also want to type commands in the console window. Is there any common way to achieve that? For example how...
9
by: Mike | last post by:
Hi, I have the following problem: I have a singleton class that I want to access from asp.net application. The trick is, that I want to create it (Singleton.GetInstance() for the first time) in...
4
by: eduardorp1 | last post by:
I have a GUI application that needs to be invoked from the command line as well. It should work both as a GUI and as a console application. When I invoke it from the command line, it reads all...
1
by: gujarsachin2001 | last post by:
Hello friends, I want to connect http or https by taking url, username & password from user (if necessary )& then connect to download file from that source in console application. Can u help...
1
by: John Wright | last post by:
I am running a console application that connects to an Access database (8 million rows) and converts it to a text file and then cleans and compacts the database. When it runs I get the following...
1
by: Claudia Fong | last post by:
Hello I'm trying to connect to a sql database using C# console application but I'm having trouble to connect.. can someone help me? // Create an empty SqlConnection object. using...
2
by: stoogots2 | last post by:
Ok, this console app that I wrote has an endpoint that listens on a TCP port. A web application sends requests to it. Both of these have been running successfully in production for the last 6...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.