Tuesday, November 27, 2007

WSS 3.0 and SQL Server Embedded Edition.

Here is a blog entry about this, which I found was useful.. I have'nt tried uninstalling it as mentioned here...but was good to know about it.

http://decipherinfosys.wordpress.com/2007/05/06/wss-and-sql-server-embedded-edition/


Related Forum entry that I found..
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=949426&SiteID=1

You can connect to the SQL Server Embedded Edition from Management Studio Express using the following as Server name..thanks to the above forum entry...
\\.\pipe\mssql$microsoft##ssee\sql\query

Tuesday, November 20, 2007

Setting Up Vista 32 Bit on a Virtual Machine

This was fun. I got a copy of Vista 32 Bit Ultimate Edition and was trying to decide if I wanted to load it as my main Operating System or not. Unfortunately we still had couple of application running on .NET 1.1 that needed to be upgraded. As I had to support them still, I had to create another environment (a virtual machine or use another physical machine) to host XP.
Not sure if it is a good decision or not, but I decided to create a virtual machine with Vista on it. I did not have any problems having that part work. But, after Vista loaded, I quickly found that my audio was not working....Tried installing various drivers, but to no avail. I then installed Virtual Machine Editions and rebooted my machine. This time,:) my audio worked!!!!

Tuesday, October 02, 2007

SQL Server 2005 Reporting Services
Service Pack 2

(Configuration Woes for Sharepoint Integrated Mode)

I finally got the SQL Server Reporting Services 2005 to run in Sharepoint Integrated Mode and can now see Reports.

Story:
We were evaluating Reporting Services and Sharepoint and wanted to see how well both of these technologies could help leverage our Business. So, tried to setup a Lab Environment. As I already mentioned in my previous blog entry, we had an Image of Windows Server 2003 SP2 and SQL Server 2005 SP2 with Reporting Services 2005 SP2 and MOSS 2007 loaded.

I started with this image and tried to set up the Integration Mode.
So, first downloaded the Reporting Services Addin here and installed it and configured the server per the documentation. I followed the links below:

http://technet.microsoft.com/en-us/library/aa905871.aspx

http://blogs.msdn.com/sharepoint/archive/2007/08/02/microsoft-sql-server-reporting-services-installation-and-configuration-guide-for-sharepoint-integration-mode.aspx

This second one above was extremely helpful when I went back and checked on some things that I overlooked the first time and configured later while I was troubleshooting below.


Issue 1
It appeared that the Addin installed fine, but when I went to look in the Central Administration, I could not find the Reporting Services Section under Application Management at all….what did I do wrong?

After some research, found out that if your Sharepoint Site Collection was not available or if the account you are using to install Reporting Services Addin does not have full control over that Site Collection(you are concerned about) when you install the Reporting Services Add-in, then the Reporting Services Integration Feature is not activated for that Site collection.

If you activate it, by doing the steps below for the site collection, you can see the Report Viewer webpart and also add Reporting Services Content Types.

http://blogs.msdn.com/rosettaue/archive/2007/04/06/how-to-activate-the-report-server-feature-in-sharepoint-central-administration.aspx

Okay…I uninstalled add-in and reinstalled with an account that was the Site Collection Adminitrator/Farm Administrator and Local Administrator of that machine. I could have done the above for my site collection in question and it would have worked.

After that I could see the Reporting Services section under Central administration. However, when I clicked on “Set Server Defaults” option is Central Administration, I was getting the following error:

Issue 2
An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode. --> Server was unable to process request. ---> The request failed with HTTP status 401: Unauthorized.

Looked all over internet and even posted the question to the forum. I followed the suggestions some people had in Brian Welckers Blog and couple others, but no luck.

I tried the following workarounds:

http://support.microsoft.com/kb/871179/en-us%20:%20Here%20I%20actually%20tried%20setting%20up%20my%20environment%20to%20“NTLM”%20(workaround)%20as%20I%20was%20working%20with%20an%20image%20and%20could%20not%20get%20the%20spn%20to%20work.: Here I actually tried setting up my environment to “NTLM” (workaround) as I was working with an image and could not get the spn to work.

http://stevenharman.net/blog/archive/2007/03/21/Avoiding-the-401-Unauthorized-Error-when-Using-the-ReportViewer-in.aspx: Here I even modified the registry, even though I was working with Windows Server 2003 SP2…which may not have needed this…

Issue 3
Well. I was tired of getting the above error message to go away and thought that as Set Server Defaults was just an optional requirement, I would go ahead and add the Report Viewer Web part to my Sharepoint Site. I was able to add the Report Viewer web part , but when I tried to create a shared data source or tried to choose an rdl to load the report viewer….I was getting an error 

Well, I tried a couple more things….

 I added SSRSWebAccount that I was using to run my Reporting Services Web Service (which also is my Report Server ApplicationPool account) to the Reporting Services Database (in my case the name of the database was OSS1) by going to the SQl Server Management Studio and manually assigning it. For some reason, it was not there to begin with.

 I gave RSExec permission to SSRSWindows Account on Reporting Services database.

 In Central Administration, I have Authentication Providers for my Site Collections set to Integrated Authentication..Kerberos…
 In Central Administration, Reporting Services -> manage integration settings… I have the Authentication Mode set up to Trusted Account.

None of this helped and suddenly I looked at the Reporting Services’ Database Version and noticed that it was 9.0.0.33. I knew that SP2 version was 9.0.03042. The version that was loaded on that image was the December, 2006 pre release version

So, what does it hurt…so I went and grabbed the latest released version of SP2 9.0.03042 and applied it on my server. After that I went back and filled in any missing configuration that I applied above. Most of it was already there.

Okay….tried now going to Set Server Defaults,…yippe…it worked…

Both of my above issues went away after I installed SQL Server 2005 SP2 9.0.03042.

It was strange that I did not have to setup spn’s even though I have my Site Collections as Integrated…Kerberos as stated was required somewhere in the docs… I still don’t completely understand that inner workings of all this…but it works well now.

Remember, all the workarounds that I applied (as stated in Issue2 and Issue3) on the server still remain. I did not undo any of that…so all that with the SP2(3042) may be what helped me solve this….

Good Luck to those of you….on your journey to Configuring Reporting Services in Integrated Mode.

Wednesday, September 19, 2007

Reporting Services

I am still having trouble getting Reporting Services to work in Sharepoint integrated mode. So, I decided to swap to native mode and try to display Reporting services Reports using WSS 2.0 Report Viewer and Report Explorer Web parts. All this I am doing in a test environment on an Image got from Microsoft, with MOSS 2007 and Reporting Services 2005 SP2 installed.

For this I followed the following article:
http://msdn2.microsoft.com/en-us/library/ms159772.aspx

However, when I tried to run the following, I was getting an error that said, it was already installed.

STSADM.EXE -o addwppack -filename "C:\ Program Files\Microsoft SQL Server\90\Tools\Reporting Services\ SharePoint\RSWebParts.cab" –globalinstall

But, I could not see the Report Viewer and Report Explorer Web parts in the “Add Web Parts” dialog box, when I tried to add them to my Sharepoint Site. I searched all over internet and found the following blog entry:

http://sqljunkies.com/WebLog/sqlbi/archive/2005/01/23/6802.aspx

I followed it and changed my STSADM command as below and ran it. In my case, as I had MOSS 2007 loaded on the same machine as Reporting Services SP2, the STSADM was found at: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN. So, I changed to this directory in command window and ran the following command.


STSADM.EXE -o addwppack -filename "C:\ Program Files\Microsoft SQL Server\90\Tools\Reporting Services\SharePoint\RSWebParts.cab" –url
http://mysharepointsite/



And :) it worked that time. It said it installed fine. When I went back to add web parts, I could now see both the Report Viewer and Report Explorer Web parts. Next, I followed the first article above and setup the Report Manager Url and Report Name properties for the Report Viewer webpart and can see the Report
fine.


See image below:

Wednesday, September 05, 2007

Network Connectivity from/to Virtual PC

As we were trying to understand how to use/implement and work with Sharepoint, few things were unveiled. We almost knew from the beginning that we had to use a Virtual PC environment for our development otherwise use another PC/Server with WIN2003 OS. But, were not sure exactly how to configure it.

When we finally got Microsoft Virtual PC 2007, loaded it up with an image that my friend got from TechEd-2007 with MOSS 2007 , Visual Studio 2005, Sql Server 2005 loaded on it.

All that was well. Now I needed to make my host machine and guest machine talk to each other. By default the Virtual Machine was using the the Shared Network from my local machine and I was able to connect to Internet from VM fine.

However, I could not see the file structure on my virtual machine from my host machine. I researched and found that I needed to install Microsoft Loopback Adapter on my host machine and configure it on my VM as the second network adapter, leaving the default Shared Network adapter as the first one on the VM. As soon as I did this, I could access my virtual machine like below from the Windows Explorer: file://myservername/C$ where myservername is the name of my virtual machine.

I used the following link to configure above:
This may not be the only way to see the Virtual Machine's file structure though and the only reason to install the loopback adapter. Still Learning.......:)

Friday, August 17, 2007

Sharepoint Musings

We were successfully able to load MOSS 2007 on a production box and have couple of sites up and running. Everything was working till the other day, a user complained that he could not find "Connect to outlook" and other Office integration options in the menu when he chose Calendar view on the calendar. There was also no "Datasheet View" on the All Events view of the calendar list. See image below:



Searched all internet and finally found a place in comments somewhere it was mentioned that Client Integration needed to be enabled in order to see this.

So, the solution was in Central Administration->Application Management->Authentication Providers--->Here there is an option to enable client integration. Enable this for the correct application and it works. The menus are now shown as expected.

Next, when I was testing the datasheet option, it wouldn't export but gave me an error stating that the wss Datasheet component was not correctly loaded....

Apparently, the problem was I did not have Office 2007 loaded on my client PC. The web datasheet option is only available if you have Access 2007 on your client machine. However, later I found the following article and followed it.

http://support.microsoft.com/kb/833714

I installed sharepoint support to my installed Office application as above and the datasheet option now works just fine.

Wednesday, May 30, 2007

Encrypt Config Sections in ASP.NET 2.0
(Encrypt Connection Strings in web.config using RSA and machine level containers)

This article assumes the user is using Visual Studio.NET 2005 Web server and wants to use the default provider with default settings. The RSAProtectedConfigurationProvider is the default provider and is configured to use the machine level key container.

Encryption:



  • Add a connection string section with a connection string in regular text in the local web.config file of your application.

  • Run the following command to encrypt (should be run from Visual Studio 2005 command prompt).

aspnet_regiis -pef "connectionStrings" c:\projects\RSAEncryptSample

Note: The third segment in the command after -pef is the section in the web.config file that you want to encrypt. The fourth segment in the command is the location of the config file whose section you want to encrypt. aspnet_regiis utility is located at %WinDir%\Microsoft.NET\Framework\'versionNumber'\. As the default provider with default settings is selected, wedo not need to use the -prov switch in the command.

And that's it the section is encrypted and your web.config file is changed with the new encrypted stuff.

Accessing Encrypted Connection String:

  • ASP.NET automatically handles the decryption in this case. All you have to do to see the connection string in text is ...somewhere in your code..like in page_load..put the following code and run the web application and you should the connection string in text.

Response.write("Connection string in Text" & ConfigurationManager.ConnectionStrings("myLocalSqlServer").ConnectionString.

Decryption :

  • Run the following command(from Visual Studio 2005 Command prompt) to decrypt the above encrypted section back.
aspnet_regiis -pdf "connectionStrings" c:\projects\RSAEncryptSample

Thursday, May 17, 2007

ASPNETDB Database in ASP.NET

The membership database ASPNETDB is automatically created under APP_Data folder when we set the Connection string for the Membership Provider in the web.config to be "LocalSqlServer" and run that web project the first time. We may see the contents of this database by attaching the created database to your local instance of SQLExpress and using Management Studio.

Alternately, we may run the aspnet_regsql.exe tool from Visual Studio 2005 prompt and it will step us through creating a new membership database on the server (SQL Server 2005 or SQL Express) wherever we ask it to in the wizard. We ofcourse would have to create a new connection string(that looks at this database) and point the membership provider to look at this new connection string in the web.config file of the respective project.