<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>IIS7 - General</title><link>http://forums.iis.net/1041.aspx</link><description>For any general questions relating to IIS 7</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: NEW INFO ADDED - IIS 7.0 and web service.  Publishing from VS 2008 not working</title><link>http://forums.iis.net/thread/1910606.aspx</link><pubDate>Fri, 17 Jul 2009 03:34:18 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1910606</guid><dc:creator>Leo Tang - MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1910606.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1910606</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How do you initialize the rootWebConfig?&amp;nbsp; If you are going to obtain configuration information from the application in which your code resides, you can use the static method. It looks like this:&lt;br /&gt;Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings(&amp;quot;PortalConnectionString&amp;quot;).ConnectionString)&lt;/p&gt;
&lt;p&gt;Actually, this is an &lt;a class="" href="http://forums.asp.net/"&gt;ASP.Net&lt;/a&gt; issue.&lt;/p&gt;</description></item><item><title>NEW INFO ADDED - IIS 7.0 and web service.  Publishing from VS 2008 not working</title><link>http://forums.iis.net/thread/1910242.aspx</link><pubDate>Tue, 14 Jul 2009 12:48:40 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1910242</guid><dc:creator>coreymas</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1910242.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1910242</wfw:commentRss><description>&lt;p&gt;Hello everyone.&lt;/p&gt;
&lt;p&gt;I have IIS7 installed and i have used the publish feature from VS2008 to publish a web service to the server.&lt;/p&gt;
&lt;p&gt;The web service works when i run it through VS2008... but when i try to test it via URL on the IIS server i get a Generic 500 error.&amp;nbsp; I am able to see the service and the method... send the method parameters etc but when I click on the invoke button i get the 500 error.&lt;/p&gt;
&lt;p&gt;My web service method accesses a SQL Server instance and it is using a SQL Authentication connection.&lt;/p&gt;
&lt;p&gt;I am guessing that this is a security/configuration issue.. but i do not know where to start looking to fix this.&lt;/p&gt;
&lt;p&gt;Edit more info&lt;/p&gt;
&lt;p&gt;This is the error I am getting (which is confusing because i am not getting this in VS2008&lt;/p&gt;
&lt;p&gt;System.NullReferenceException: Object reference not set to an instance of an object.&lt;br /&gt;&amp;nbsp;&amp;nbsp; at PortalWebService.PortalWebService.VerifyStudentLogin(String UserName, String Password, Int32 LoginType) in D:\Projects\PortalWebService\PortalWebService\PortalWebService\PortalWebService.asmx.vb:line 19&lt;/p&gt;
&lt;p&gt;Line 19 in my code is my connection string line (if i can trust the line numbering scheme in VS2008&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; conn &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; SqlConnection(rootWebConfig.ConnectionStrings.ConnectionStrings(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;PortalConnectionString&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;).ConnectionString)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;And yes this string does exist in my WebConfig.&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;I Have narrowed this down a bit... when i use a connection string in a web config file it fails... but if i hard code the string in the VB code it works..... why is it having trouble accessing/reading the web config file of my application?&lt;/p&gt;
&lt;p&gt;Any help would be appreciated.&lt;/p&gt;
&lt;p&gt;Corey&lt;/p&gt;</description></item></channel></rss>