Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Monday, March 26, 2012

error during setup of microsoft sql express 2005 edition for visual web design?

error saying disk compressed or encryted, choose another drive?

how should i t-shoot !!!!!

This one means exactly what it says. You can't install SQL Server onto a compressed drive, you will need to choose another drive or uncompress your drive. This is documented in BOL.

Mike

Error during merge web sync

Hello,

We have 5 subscribers trying to replicate via web synchronization. Two of the subscribers get the following message and the other three are fine. Any ideas on what the problem is or where to troubleshoot? Thanks in advance.

John

Error on client output:

The format of a message during Web synchronization was invalid. Ensure that replication components are properly configured at the Web server.

Are you using a mix of .NET 1.1 and .NET 2.0 in your applications? If so, that can cause this error to happen. Try migrating your application to .NET 2.0 completely and see if that fixes your problem.|||

Mahesh,

Our app does uses a class that was developed using 1.1. However this class has nothing to do with replication. Could this still cause this error?

John

|||

On the IIS machine if there is an app that uses .NET 1.1, it could cause this to happen.

Another way to troubleshoot is to run https://Machine.domain/virtualDir/replisapi.dll?diag and you should see SUCCESS in all the class instantiation on that page. If not, then that is the cause of the problem.

|||

Mahesh,

This is a web server box that only has two virtual directories. Both are used for replication. One for sqlexpress replication and the other for WM 5.0 devices. We get successes from both sqlexpressurl/replisapi.dll?diag and wm50url/sqlcesa30.dll?diag, with the exception of the reconciler for the wm50url/sqlcesa30.dll?diag for version 8.0 which we are not using. This sites are all running asp 2.0

John

|||I have seen typically that once is 3 times you can get successes. Other times it could fail to load the dll and hance cause the sync to fail. Can you try on a different IIS box that doesnt have anything except the virtual directory to rule out this possibility?|||Hi John,

I have had this exact same message. Basically this occured because changes to the publisher database meant the subscribers required a new data partition snapshot. I pre-generated the snapshot and I have the option to allow subscribers to auto generate snapshots switched off. When the subscriber connects it does not recognise and hence does not download the pre-generated snapshot file and there for began the process of enumerating all the data that is needed for the subscriber. Immediately after downloading x number of chunks it then pops the same messaqge you receive.

If I was to switch auto generate snapshots option on then the subscriber happily runs the snapshot agent then downloads and applies it as expected. This was not ideal as we did not want auto-snapshot on for server load reasons.

We were at this timeusing FTP not UNC for delivery of snapshots. We had trouble with UNC shares between the servers which forced our hand on this. I spent two weeks in conversation with Microft Tech Support, until I tried finally to solve the UNC issue. I managed to get the UNC share visible from our webserver and hey presto it sorted our problem out and the subscribers happily retrieve pre-generated snapshots.

Not sure if this is anyway similar situation but might be useful

Cheers
Rab|||

Rab,

I'll give that a try thanks for the input I appreciate it.

John

|||

Mahesh,

We are having the same problem. The client application is solely 2.0 framework, but the client unit also has framework 1.1 for some other applications not related to the replication process. The webserver is solely 2.0 framework and doesn't even have 1.1 installed on the machine. Is there another reason for these errors? It looks like we get the 14151 error first the the web synchronization right after it. SQL 2k5 SP1.

Server logs:

Date 3/27/2007 10:14:47 PM
Log SQL Server (Current - 3/28/2007 6:00:00 AM)

Source spid102

Message
Replication-Replication Merge Subsystem: agent INSTANCE_NAME failed. The format of a message during Web synchronization was invalid. Ensure that replication components are properly configured at the Web server.

Date 3/27/2007 10:14:47 PM
Log SQL Server (Current - 3/28/2007 6:00:00 AM)

Source spid102

Message
Error: 14151, Severity: 18, State: 1.

Error during merge web sync

Hello,

We have 5 subscribers trying to replicate via web synchronization. Two of the subscribers get the following message and the other three are fine. Any ideas on what the problem is or where to troubleshoot? Thanks in advance.

John

Error on client output:

The format of a message during Web synchronization was invalid. Ensure that replication components are properly configured at the Web server.

Are you using a mix of .NET 1.1 and .NET 2.0 in your applications? If so, that can cause this error to happen. Try migrating your application to .NET 2.0 completely and see if that fixes your problem.|||

Mahesh,

Our app does uses a class that was developed using 1.1. However this class has nothing to do with replication. Could this still cause this error?

John

|||

On the IIS machine if there is an app that uses .NET 1.1, it could cause this to happen.

Another way to troubleshoot is to run https://Machine.domain/virtualDir/replisapi.dll?diag and you should see SUCCESS in all the class instantiation on that page. If not, then that is the cause of the problem.

|||

Mahesh,

This is a web server box that only has two virtual directories. Both are used for replication. One for sqlexpress replication and the other for WM 5.0 devices. We get successes from both sqlexpressurl/replisapi.dll?diag and wm50url/sqlcesa30.dll?diag, with the exception of the reconciler for the wm50url/sqlcesa30.dll?diag for version 8.0 which we are not using. This sites are all running asp 2.0

John

|||I have seen typically that once is 3 times you can get successes. Other times it could fail to load the dll and hance cause the sync to fail. Can you try on a different IIS box that doesnt have anything except the virtual directory to rule out this possibility?|||Hi John,

I have had this exact same message. Basically this occured because changes to the publisher database meant the subscribers required a new data partition snapshot. I pre-generated the snapshot and I have the option to allow subscribers to auto generate snapshots switched off. When the subscriber connects it does not recognise and hence does not download the pre-generated snapshot file and there for began the process of enumerating all the data that is needed for the subscriber. Immediately after downloading x number of chunks it then pops the same messaqge you receive.

If I was to switch auto generate snapshots option on then the subscriber happily runs the snapshot agent then downloads and applies it as expected. This was not ideal as we did not want auto-snapshot on for server load reasons.

We were at this timeusing FTP not UNC for delivery of snapshots. We had trouble with UNC shares between the servers which forced our hand on this. I spent two weeks in conversation with Microft Tech Support, until I tried finally to solve the UNC issue. I managed to get the UNC share visible from our webserver and hey presto it sorted our problem out and the subscribers happily retrieve pre-generated snapshots.

Not sure if this is anyway similar situation but might be useful

Cheers
Rab
|||

Rab,

I'll give that a try thanks for the input I appreciate it.

John

|||

Mahesh,

We are having the same problem. The client application is solely 2.0 framework, but the client unit also has framework 1.1 for some other applications not related to the replication process. The webserver is solely 2.0 framework and doesn't even have 1.1 installed on the machine. Is there another reason for these errors? It looks like we get the 14151 error first the the web synchronization right after it. SQL 2k5 SP1.

Server logs:

Date 3/27/2007 10:14:47 PM
Log SQL Server (Current - 3/28/2007 6:00:00 AM)

Source spid102

Message
Replication-Replication Merge Subsystem: agent INSTANCE_NAME failed. The format of a message during Web synchronization was invalid. Ensure that replication components are properly configured at the Web server.

Date 3/27/2007 10:14:47 PM
Log SQL Server (Current - 3/28/2007 6:00:00 AM)

Source spid102

Message
Error: 14151, Severity: 18, State: 1.

Thursday, March 22, 2012

Error deploying a CLR Stored Procedure that uses a web service

Ok, first some background.

I am writing my first (complex) CLR Stored Procedure using Visual Studio 2005.

This SP worked fine until I added code to make a web service call. That web service is a wrapper web service I created because the actual web service I need to call uses System. Web.Extensions which was not available in my VS2005 Database Project.

At first I was getting the standard "External Access Assembly" errors, so I created a new user (was using SA) and assigned database ownership to the new user, then assigned permissions to that user. This worked to get it deployed, but I get the following error when its run:

<code>

System.InvalidOperationException: Cannot load dynamically generated serialization assembly. In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. Please see inner exception for more information. > System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.

System.IO.FileLoadException:

at System.Reflection.Assembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection)

at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)

at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)

at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)

at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)

at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, S

</code>

Anyone have any ideas?

Thanks!

Dave Borneman

Solution Architect,

anyWare Mobile Solutions.

OK, so when you are using Web services the .NET framework will dynamically generate an assembly based on your proxy code. Dynamic assembly generation is not allowed inside SQL Server (SQLCLR).

What you need to do is to pre-generate the proxy assembly by using the sgen tool and deploy that generated assembly into the database.

Look at this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=74480&SiteID=1 and specifically the 6:th message in that thread how to achieve the pre-generation.

Niels

Monday, March 19, 2012

Error Creating Counter?

Does anyone know what causes this error (Error Creating Counter)

w3wp!library!9!9/8/2005-14:25:27:: e ERROR: Error creating counter. Category: RS Web Service, Counter: Total Cache Hits (Semantic Models), Instance: APPCENTER2005. Error Description: System.InvalidOperationException: Counter 'total cache hits (semantic models)' does not exist in category 'rs web service'.
at System.Diagnostics.SharedPerformanceCounter..ctor(String catName, String counterName, String instanceName, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.PerformanceCounter.Initialize()
at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
at Microsoft.ReportingServices.Diagnostics.Utilities.RSCounter.Init(String categoryName, String counterName, String instanceName, RSTrace tracer)This looks like a known issue with performance counters not being correctly installed in CTP June and should be resolved in CTP September.

-- Robert

Friday, March 9, 2012

Error connecting to the sqlserver express edition from visual web developer 2005

hello eveyone..

i have just downloaded and installed the visaul web developer 2005 express edition and sqlserver 2005 express edition.On top of that i even downloaded and installed the northwind database.But my problem is when i am connecting to the northwind database by clicking toos menu>connect to the database>choose datasource>new connection>..i have provided it with the required information..but as soon as i press "Test Connection" button the following error box displays..

"an error has occured while establishing a connection to the server.when connecting to the
sql server2005,this failure may be caused by the fact that under default settings sql server
doestnot allow remote connections.(provider:Named piped providers,error:40-couldnot open a
connection to sqlserver.)"

i have no idea whats is all about..can anyone get me pass this error..

yea that error is pretty bogus in that it will show that for all kinds of problems even if they have nothing to do with remote connections...and im not trying to be insulting but did you for sure actually start the server itself or did you just try and do everything through the visual studio? I have set up a connection before through visual studio and had no problems...can you provide some more info? -- jp

|||

Hi

From your description, it seems that you met error when you are trying to connect to your SQLExpress,right?

This is a generally error message. To diagnose the issue, you may following the steps below.

First, you also should make sure that if 1433 port has been enabled on your server, which is the default port for SQLServer remote connections.

Generally, you can try the following ways to handle your problem.

1. Enable remote connections for SQL Server 2005 Express or SQL Server 2005 Developer Edition
2. Enable the SQL Server Browser service
3. Create exceptions in Windows Firewall
4. Create an exception for SQL Server 2005 in Windows Firewall

More details for each step, you may see the following link:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277 (Also suitable for SQLExpress)

Thanks.

Error connecting to SQLExpress 2005 locally

Hello,
I'm a newbie here and was wondering anyone could help me with this.
I have a simple ASP.NET 2 web application running perfectly fine with
IIS and SQLServerExpress installed locally on my WinXP as a testing
server (I created the app in Visual Studio.NET 2005).
When deploying this app on the production server (running Win2000
Server, IIS and SQLServerExpress 2005), I'm getting the following
message when calling an aspx data-bound page from a browser:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)
On the production server, I have the SQLServerExpress installed locally
on C: drive and the database is located on D: drive (on the same
directory as the app).
Connection string used in the webconfig file:
connectionString=" Server=SERVERNAME\SQLEXPRESS;AttachDbFil
ename=D:\Inetpub\A
pp_Data\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
providerName="System.Data.SqlClient"
Does anyone know how to solve this issue? Any help would be greatly
appreciated.
Thanks,
HarryHi
Have you checked if you are allowing remote connections on your SQL Express
installation, by default these will be switched off.
Check the Remote Connections setting the the SQL Server 2005 Surface Aread
Configuration tool.
John
"hko" wrote:

> Hello,
> I'm a newbie here and was wondering anyone could help me with this.
> I have a simple ASP.NET 2 web application running perfectly fine with
> IIS and SQLServerExpress installed locally on my WinXP as a testing
> server (I created the app in Visual Studio.NET 2005).
> When deploying this app on the production server (running Win2000
> Server, IIS and SQLServerExpress 2005), I'm getting the following
> message when calling an aspx data-bound page from a browser:
> An error has occurred while establishing a connection to the server.
> When connecting to SQL Server 2005, this failure may be caused by the
> fact that under the default settings SQL Server does not allow remote
> connections. (provider: SQL Network Interfaces, error: 26 - Error
> Locating Server/Instance Specified)
> On the production server, I have the SQLServerExpress installed locally
> on C: drive and the database is located on D: drive (on the same
> directory as the app).
> Connection string used in the webconfig file:
> connectionString=" Server=SERVERNAME\SQLEXPRESS;AttachDbFil
ename=D:\Inetpub
\App_Data\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
> providerName="System.Data.SqlClient"
> Does anyone know how to solve this issue? Any help would be greatly
> appreciated.
> Thanks,
> Harry|||Hi John,
I did allow remote connections eventhough my database is on the same machine
as my web app, but no luck so far.
I used windows authentication for the database, and login to the machine
using admin account.
Another thing that I noticed is that when I go to SQL Server Configuration
Manager, under SQL Server 2005 Network Configuration, it says Protocols for
MSSQLSERVER, whereas on my dev machine it says SQLEXPRESS. When upgrading
from MSDE to SQLExpress i just chose the default instance name, but somehow
it's saying MSSQLSERVER.
I checked the databaseconnection through SQL Management Studio Express and
it works fine. Only when viewing the data-bound page on a browser that I get
the error message.
Do you think I should try to uninstall SQLServer Express and reinstall?
hko
"John Bell" wrote:
> Hi
> Have you checked if you are allowing remote connections on your SQL Expres
s
> installation, by default these will be switched off.
> Check the Remote Connections setting the the SQL Server 2005 Surface Aread
> Configuration tool.
> John
> "hko" wrote:
>|||Hi
If this is the default instance then change your connection string to only
be the servername.
If you want to change the installation from being the default instance you
will need to re-install.
John
"hko" wrote:
> Hi John,
> I did allow remote connections eventhough my database is on the same machi
ne
> as my web app, but no luck so far.
> I used windows authentication for the database, and login to the machine
> using admin account.
> Another thing that I noticed is that when I go to SQL Server Configuration
> Manager, under SQL Server 2005 Network Configuration, it says Protocols fo
r
> MSSQLSERVER, whereas on my dev machine it says SQLEXPRESS. When upgrading
> from MSDE to SQLExpress i just chose the default instance name, but someho
w
> it's saying MSSQLSERVER.
> I checked the databaseconnection through SQL Management Studio Express and
> it works fine. Only when viewing the data-bound page on a browser that I g
et
> the error message.
> Do you think I should try to uninstall SQLServer Express and reinstall?
> hko
> "John Bell" wrote:
>|||I only have one instance and that is the default instance, and this is my
connection string:
connectionString=" Server=HOMER\SQLEXPRESS;AttachDbFilename
=D:\Inetpub\App_Da
ta\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
providerName="System.Data.SqlClient"
Still something isn't right. Do you think I should probably re-install and
do fresh installation of SQL Express instead of upgrading (like what I did)?
"John Bell" wrote:
> Hi
> If this is the default instance then change your connection string to only
> be the servername.
> If you want to change the installation from being the default instance you
> will need to re-install.
> John
>
> "hko" wrote:
>|||Hi
Try the connection string:
connectionString=" Server=HOMER;AttachDbFilename=D:\Inetpub
\App_Data\registra
tion. mdf;Database=registration;Trusted_Connec
tion=yes;"
providerName="System.Data.SqlClient"
If you want a names instance then you would have to re-install and say that
you want a named instance and not the default instance.
John
"hko" wrote:
> I only have one instance and that is the default instance, and this is my
> connection string:
> connectionString=" Server=HOMER\SQLEXPRESS;AttachDbFilename
=D:\Inetpub\App_
Data\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
> providerName="System.Data.SqlClient"
> Still something isn't right. Do you think I should probably re-install and
> do fresh installation of SQL Express instead of upgrading (like what I did
)?
> "John Bell" wrote:
>|||Still not working. I tried different combination of connection strings but
kept getting the same error message.
I just want to use the default instance since there's only one database on
the machine.
I suspect there's a glitch during the upgrade process which causes SQL
server to locate the default instance. I was able to connect ok using
Management Studio Express.
This is the most frustrating thing ever to deal with...
"John Bell" wrote:
> Hi
> Try the connection string:
> connectionString=" Server=HOMER;AttachDbFilename=D:\Inetpub
\App_Data\regist
ration. mdf;Database=registration;Trusted_Connec
tion=yes;"
> providerName="System.Data.SqlClient"
> If you want a names instance then you would have to re-install and say tha
t
> you want a named instance and not the default instance.
> John
> "hko" wrote:
>|||Hi
A couple of suggestions:
Try using osql to try and connect, use both the server name and the IP
address and different user combinations.
Check that there is no blocking of the ports being used by a firewall (Try
telneting to the port!)
John
"hko" wrote:
> Still not working. I tried different combination of connection strings but
> kept getting the same error message.
> I just want to use the default instance since there's only one database on
> the machine.
> I suspect there's a glitch during the upgrade process which causes SQL
> server to locate the default instance. I was able to connect ok using
> Management Studio Express.
> This is the most frustrating thing ever to deal with...
> "John Bell" wrote:
>

Wednesday, March 7, 2012

Error connecting to localhost site to view SQL server Mobile Agent on Device

I have set up a locahost site in IIS using the "Configure Web Synchronization Wizard". One of the first test I was asked to do was to open a broweser and browse to http://localhost/MobileTest/sqlcesa30.dll

If all is well I should get a web page with the following line:

SQL Server Mobile Server Agent 3.0

But unfortunately I get an error stating :
"The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance."

I checekd the Event log and found this error related the IIS launch process on my machine.

DCOM got error "Logon failure: unknown user name or bad password. " and was unable to logon .\IWAM_Rataq in order to run the server:

where Rataq is the name of my machine. Could my IWAM_Rataq account be corrupted, my other sites on the machine work.

Infact if i put in a Test.htm page in the virtual directory MobileTest I am able to browse to the page.

Can the Account be re-set? is there another problem that I am not aware of. I have Norton Internet 2006 running could that be the reason? Could Norton be blocking the dll from loading? But the event log states it is a Account error.

Any ideas why this might occur? any help is always appreciated

It is unlikely to be that the account is corrupt. It is more likely to be a permissions issue somewhere between authenticating the user against the site (which from what you are saying is simply the anonymous user) and pulling data out of the database. I would suggest that in the "Configure Web Sync Wizard" that you select Windows authentication and see if that allows you to sync - this will use your current logon credentials (when you access the url) instead of the anoymous user.

Error Connecting to DB

I downloaded an ASP.NET web application from the web to learn the .NET framework. I was successful in running the website on my laptop using ASP.NET Development Server that comes with Visual Studio 2005. My laptop is running Windows XP Professional and SQL Server 2005. I am now trying to do the same on my desktop computer running Windows Vista; however, for some reason i am getting an error when the website tries to connect to the DB. Here are the steps i have followed so far:

1. I tried to configure the website DB connection the same way i configured it on my laptop. Basically I use the following connectionStrings:

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=TheBeerHouse;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings
2. That same connection string worked fine on my laptop. But I got the following error on my desktop:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I am wondering if the error is related to Vista. When i try to connect to that DB using SQL Management Studio via Windows Authetication and do not run it as Administrator then I cannot connect to the DB. In other words, only when i run SQL Management Studio as administrator i am able to use Windows authentication to connect to that DB.

3. Next, I tried creating a SQL login. I made sure I can use that login to access the DB directly using SQL Management Studio. In addition, I changed the database to allow "Local and remote connections" "Using both TCP/IP and named pipes".

4. Changed the connectionStrings in web.config to:

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=TheBeerHouse;Integrated Security=False;uid=*****pwd=****" providerName="System.Data.SqlClient"/>
</connectionStrings
Obviously, the actual connectionString has the actual user name i created and the correct password instead of (*) asterisks.

5. And once again, I got same error as above

Any help will be appreciated!


Hi,

Is sqlserver on your desktop running in "Windows Authentication Mode" or "Mixed Mode"

Open up SqlServer Management Studio, right click on the Server, not the database(s), then in the left hand menu shown select Security. The dialog box on the right should have"SQL Server and Window Authentication Mode" checked instead of just"Windows Authentication Mode".

Hope this helps

Regards

ScottyB

|||

I have "SQL Server and Window Authentication Mode"checked. I can login directly to the database via SQL Managament Studio using the same login and password as specified in the connectionString. I also have allowedLocal and remote connections and haveUsingboth TCP/IP and named pipeschecked.

|||

Hi nj07208

I have just noticed in the connection string that you posted here that you do not have a semiclon after the uid and pwd parameters. You can try this. See the listings below

Original Connection String

<connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=TheBeerHouse;Integrated Security=False;uid=*****pwd=****" providerName="System.Data.SqlClient"/> </connectionStrings>

Modified Connection String

<connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=TheBeerHouse;Integrated Security=False;uid=*****;pwd=****"; providerName="System.Data.SqlClient"/> </connectionStrings>

Regards

ScottyB

|||

i guess you meant with the semicolon right after the password before the double quotes. I tried that and it didn't work =(

|||

I got a new error now! I turned off my firewalls (both Windows and McAfee ViruScan) and now i get a new error:

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

Any ideas?


|||

If you have access to the iismanager try doing a pool reset or a iisreset.

Do you have any code in your application that goes through a loop and opens connections. This error may suggest you are opening connections faster than the garbage collector can dispose of them.

Regards

ScottyB

|||

I am using ASP.NET Development Server that comes with Visual Studio 2005. I am not using IIS.

|||

I got it!!! It works now!!! On the connectionString i changed Data Source from localhost to localhost\SQLEXPRESS. This is needed because I am using a named instance. So, to recap for anyone who is interested, these are the steps i followed:

1. EnableSQL Server and Windows Authentication mode. This can be done from SQL Management Studio

2. Create SQL Server login. Make sure you can login to the database using SQL Management Studio

3. EnableLocal and remote connections and haveUsingboth TCP/IP and named pipeschecked. This can be done from SQL Server Surface Area Configuration.

4. Connection String on web.config should be the following

<connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=localhost\SQLEXPRESS;Initial Catalog=TheBeerHouse;Integrated Security=False;uid=username;pwd=password;" providerName="System.Data.SqlClient"/></connectionStrings>
Note that I enabled both Windows and McAvfee AntiVirus firewalls and it still works.

Sunday, February 26, 2012

Error connecting through the web

Hi all, I'm new to SQL so here goes, we got a dbase we're putting up for the
web, and basically we're testing it out for connectivity, I set the system
dsn with the account that's in SQL server (got the server in mixed mode
auth), when I try to login to a page we put together I get this error
"Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user 'mitch'.
/ConnOpen.inc, line 10"
the username mitch exists in SQL server, the tests runs fine through
ODBC>system dsn. I looked all over the forums and can't find my issue or
anything similar, if anyone's seen this before, any pointers or ideas would
be great. ThanksA just plain "Login failed" error message indicates a bad
user name/password. If there is more with the message,
sometimes that can't help track it down. Turn on failed
login audits in SQL Server to make sure you are getting the
entire message. To turn it on, open Enterprise Manager,
right click on the server and select properties. Go to the
security tab and under Audit Level select Failed. Restart
SQL Server. The failed logins will then be logged to the SQL
Server logs.
If you are getting a full error message of login failed for
xyz. Not associated with a trusted SQL Server connection,
then it means you are trying to use a SQL login but your
server is only configured for Windows authentication. If you
need to use SQL logins, change the Authentication to SQL
Server and Windows. It's on the security tab of the
properties for SQL Server.
If you are trying to connect with Windows authentication,
then in the connection string, don't supply a user name and
password. Use Integrated Security=SSPI with an OLE DB
provider in your connection string instead of supplying a
username and password.
You may want to change drivers that you are using. The OLE
DB provider for ODBC is considered obsolete.
You can find more on connection strings at:
http://www.carlprothman.net/Default.aspx?tabid=81
-Sue
On Mon, 31 Oct 2005 14:55:06 -0800, "carlomd"
<carlomd@.discussions.microsoft.com> wrote:

>Hi all, I'm new to SQL so here goes, we got a dbase we're putting up for th
e
>web, and basically we're testing it out for connectivity, I set the system
>dsn with the account that's in SQL server (got the server in mixed mode
>auth), when I try to login to a page we put together I get this error
>"Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
>[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user 'mitch'.
>/ConnOpen.inc, line 10"
>the username mitch exists in SQL server, the tests runs fine through
>ODBC>system dsn. I looked all over the forums and can't find my issue or
>anything similar, if anyone's seen this before, any pointers or ideas would
>be great. Thanks|||Thanks for the reply, it works now, I changed the username settings in a
config file that resides in inetpub and it worked, thanks again.
"Sue Hoegemeier" wrote:

> A just plain "Login failed" error message indicates a bad
> user name/password. If there is more with the message,
> sometimes that can't help track it down. Turn on failed
> login audits in SQL Server to make sure you are getting the
> entire message. To turn it on, open Enterprise Manager,
> right click on the server and select properties. Go to the
> security tab and under Audit Level select Failed. Restart
> SQL Server. The failed logins will then be logged to the SQL
> Server logs.
> If you are getting a full error message of login failed for
> xyz. Not associated with a trusted SQL Server connection,
> then it means you are trying to use a SQL login but your
> server is only configured for Windows authentication. If you
> need to use SQL logins, change the Authentication to SQL
> Server and Windows. It's on the security tab of the
> properties for SQL Server.
> If you are trying to connect with Windows authentication,
> then in the connection string, don't supply a user name and
> password. Use Integrated Security=SSPI with an OLE DB
> provider in your connection string instead of supplying a
> username and password.
> You may want to change drivers that you are using. The OLE
> DB provider for ODBC is considered obsolete.
> You can find more on connection strings at:
> http://www.carlprothman.net/Default.aspx?tabid=81
> -Sue
> On Mon, 31 Oct 2005 14:55:06 -0800, "carlomd"
> <carlomd@.discussions.microsoft.com> wrote:
>
>

Error connecting through the web

Hi all, I'm new to SQL so here goes, we got a dbase we're putting up for the
web, and basically we're testing it out for connectivity, I set the system
dsn with the account that's in SQL server (got the server in mixed mode
auth), when I try to login to a page we put together I get this error
"Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'mitch'.
/ConnOpen.inc, line 10"
the username mitch exists in SQL server, the tests runs fine through
ODBC>system dsn. I looked all over the forums and can't find my issue or
anything similar, if anyone's seen this before, any pointers or ideas would
be great. Thanks
A just plain "Login failed" error message indicates a bad
user name/password. If there is more with the message,
sometimes that can't help track it down. Turn on failed
login audits in SQL Server to make sure you are getting the
entire message. To turn it on, open Enterprise Manager,
right click on the server and select properties. Go to the
security tab and under Audit Level select Failed. Restart
SQL Server. The failed logins will then be logged to the SQL
Server logs.
If you are getting a full error message of login failed for
xyz. Not associated with a trusted SQL Server connection,
then it means you are trying to use a SQL login but your
server is only configured for Windows authentication. If you
need to use SQL logins, change the Authentication to SQL
Server and Windows. It's on the security tab of the
properties for SQL Server.
If you are trying to connect with Windows authentication,
then in the connection string, don't supply a user name and
password. Use Integrated Security=SSPI with an OLE DB
provider in your connection string instead of supplying a
username and password.
You may want to change drivers that you are using. The OLE
DB provider for ODBC is considered obsolete.
You can find more on connection strings at:
http://www.carlprothman.net/Default.aspx?tabid=81
-Sue
On Mon, 31 Oct 2005 14:55:06 -0800, "carlomd"
<carlomd@.discussions.microsoft.com> wrote:

>Hi all, I'm new to SQL so here goes, we got a dbase we're putting up for the
>web, and basically we're testing it out for connectivity, I set the system
>dsn with the account that's in SQL server (got the server in mixed mode
>auth), when I try to login to a page we put together I get this error
>"Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
>[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'mitch'.
>/ConnOpen.inc, line 10"
>the username mitch exists in SQL server, the tests runs fine through
>ODBC>system dsn. I looked all over the forums and can't find my issue or
>anything similar, if anyone's seen this before, any pointers or ideas would
>be great. Thanks
|||Thanks for the reply, it works now, I changed the username settings in a
config file that resides in inetpub and it worked, thanks again.
"Sue Hoegemeier" wrote:

> A just plain "Login failed" error message indicates a bad
> user name/password. If there is more with the message,
> sometimes that can't help track it down. Turn on failed
> login audits in SQL Server to make sure you are getting the
> entire message. To turn it on, open Enterprise Manager,
> right click on the server and select properties. Go to the
> security tab and under Audit Level select Failed. Restart
> SQL Server. The failed logins will then be logged to the SQL
> Server logs.
> If you are getting a full error message of login failed for
> xyz. Not associated with a trusted SQL Server connection,
> then it means you are trying to use a SQL login but your
> server is only configured for Windows authentication. If you
> need to use SQL logins, change the Authentication to SQL
> Server and Windows. It's on the security tab of the
> properties for SQL Server.
> If you are trying to connect with Windows authentication,
> then in the connection string, don't supply a user name and
> password. Use Integrated Security=SSPI with an OLE DB
> provider in your connection string instead of supplying a
> username and password.
> You may want to change drivers that you are using. The OLE
> DB provider for ODBC is considered obsolete.
> You can find more on connection strings at:
> http://www.carlprothman.net/Default.aspx?tabid=81
> -Sue
> On Mon, 31 Oct 2005 14:55:06 -0800, "carlomd"
> <carlomd@.discussions.microsoft.com> wrote:
>
>

Friday, February 17, 2012

error attaching .mdf

I have been asked to edit a web based database and have been given the site on cd.

I have installed IIS, sql server express and Visual Web Developer express.

I am having problems getting the mdf database connected. It works at the school where they have it installed and as far as I know I have mirrored the configuration they have on one of my test servers.

The database is in App_Data

the connection string is "Data Source=.\SQLEXPRESS;AttachDbFilename=c:\inetpub\wwwroot\App_Data\campbell.mdf;Integrated Security=True;User Instance=True"

And the state is closed.

When I view one of the aspx pages in IE I get the following.

Server Error in '/' Application.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 6: <compilation defaultLanguage="vb" debug="true" />Line 7: <customErrors mode="Off" />Line 8: <authentication mode="Windows" />Line 9: <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />Line 10: <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20" />


Source File:c:\inetpub\wwwroot\app\campbell_house\web.config Line:8

The common error is:

"Error 1 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. c:\inetpub\wwwroot\App\Campbell_House\Web.config 8 "

When I test the database connection I get a message

The header file for 'c:\inetpub\wwwroot\App_Data\campbell.mdf ' is not a valid database file header. The File Size property is incorrect. An attempt to attach an auto named database for file 'c:\inetpub\wwwroot\App_Data\campbell.mdf ' failed.A database with the same name existsor the specified file cannot be opened or it is located on a UNC share

Any help would be great.

Ok so I am pretty new to this but I am making progress. I had tried all afternoon and it wasn't until after I posted here that I had a brainwav.

Stage Two

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +173 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199 System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +1069 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +606 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +193 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +501 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +510 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89 System.Data.SqlClient.SqlConnection.Open() +160 CampbellHouse.CommonFunctions.GetConnection() +55 CampbellHouse.search.Page_Load(Object sender, EventArgs e) +347 System.Web.UI.Control.OnLoad(EventArgs e) +80 System.Web.UI.Control.LoadRecursive() +49 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3745

Once again, hope someon can help me out here.

|||

Hi,

I believe the cause of the problem is due to the web.config file being located in a folder that isn't marked in IIS as an application.

Your web.config currently appears to be located in:

c:\inetpub\wwwroot\app\campbell_house

It contains settings which ASP.NET requires being declared for the entire web application (e.g. the <authentication ...> section).

Try making 'campbell_house' an application using IIS management console.

Good luck :)

Wayne.

|||I'we got the same problem, might this be because i'aint got an Internet Connection at my Home?

error applying initial snapshot

Hi


Using HTTPS web synchronisation - merge replication.

I have a very strange error where it bombs out half-way through downloading the snapshot

Downloaded a total of 3 chunks.
Downloaded snapshot file 'snapshot.pre'.
Downloaded snapshot file 'myView_6.sch'.
Downloaded snapshot file 'table2_2.sch'.
Downloaded snapshot file 'table2_2.cft'.
Downloaded snapshot file 'table3_3.sch'.
Downloaded snapshot file 'table3_3.cft'.
Downloaded snapshot file 'mytestProc1_4.sch'.
Downloaded snapshot file 'mytestProc3_5.sch'.
Downloaded snapshot file 'MSmerge_tombstone.bcp'.
Downloaded snapshot file 'MSmerge_contents90_forall.bcp'.
Downloaded snapshot file 'MSmerge_genhistory90.bcp'.
Downloaded snapshot file 'sysmergesubsetfilters90.bcp'.
Downloaded snapshot file 'table2_2.bcp'.

A failure occurred when accessing 'MSmerge_contents_table290_forall.bcp' due to an operating system error [3='The system cannot find the path specified.'] during Web synchronization. Ensure that the -InternetLogin user when using basic authentication and the user running the merge when using Windows integrated authentication has been granted access to the snapshot share.

A failure occurred when accessing 'MSmerge_contents_table290_forall.bcp' due to an operating system error [3='The system cannot find the path specified.'] during Web synchronization. Ensure that the -InternetLogin user when using basic authentication and the user running the merge when using Windows integrated authentication has been granted access to the snapshot share.

The processing of the response message failed.

I've tried compressing the snapshot, and can see the bcp file in the snapshot.


HELP !!!

Bruce...

Did you have a snapshot agent job (from SQL Agent) while merge is running? Was the job disabled? It is very likely that some process is holding that file when downloading the snapshot files.

Thanks.

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

No - definitely not

The subscriptions is setup as follows:

subscription.CreateSyncAgentByDefault = False -- I wrote a windows service to synchronise
subscription.UseWebSynchronization = True
subscription.InternetSecurityMode = AuthenticationMethod.BasicAuthentication
subscription.SubscriberType = MergeSubscriberType.Anonymous

We've tried compressing and not-compressing the snapshot....

It used the snapshot fine when initialising the subscription - it's only after we added a proc to the publication and recreated the subscription. We've tried a number of times to synchronise - we've even rebooted the server (publisher)...

Thanks
Bruce

|||

Is it necessary to re-create the snapshot after adding a SP to the publication?

Also I am not sure why you need to recreate the subscription in this scenario?

Thanks.

|||

Yes it is necessary - this is covered in BOL.

I didn't say we recreated the subscription in this scenario

Thanks
Bruce

|||

Let us get back to your original question.

1. Since you used basic authentication in the web sync, so I assuem you have provided NT user name and password to access the web virtual directory.

2. Is 'MSmerge_contents_table290_forall.bcp' a big file to get downloaded? Please also check the timeout value on both the web server and the merge subscription.

3. I assum you have tried multiple times of the initial snapshot. Is it always failed on the same file ('MSmerge_contents_table290_forall.bcp' )?

Thanks.

|||

1. yes

2. no - it is not timing out- it even downloads the cabinet file with the file in it

3. yes

|||

Let us try to isolate this problem. Does this problem also appear if you run the merge agent to sync in fully connected mode, not web sync?

Thanks.

|||

Hi

We don't create the sync agent - so it a bit hard to test - some of our subscribers are sqlExpress - which doesn't have the agent....

(see earlier append - (subscription.CreateSyncAgentByDefault = False)


Bruce

|||

For debugging purpose, you can start the initial sync by invoking replmerg.exe. This executable should be available on SQL Express.

To run the sync agent in fully connected mode, you may want to try

replmerg.exe" -Publisher [publisher server name] -PublisherDB [publisher database name] -Publication [publication name] -PublisherSecurityMode 0 -PublisherLogin [xxxxxx] -PublisherPassword xxxxxx -Distributor [distributor server name] -DistributorLogin [xxxxxx] -DistributorPassword xxxxxx -DistributorSecurityMode 0 -Subscriber [subscriber server name] -SubscriberDB [subscriber database name] -SubscriberLogin [xxxxxx] -SubscriberPassword xxxxxx -SubscriberSecurityMode 0 -SubscriptionType (?) -QueryTimeout 0 -LoginTimeout 0

To run the sync agent in web sync mode, additional parameters needed as

-InternetURL https://your_web_server_name/virtual_directory_path/replisapi.dll -InternetTimeout 5000 -InternetLogin [domain user name] -InternetPassword [domain user password].

Let's see if the same problem shown again.

Thanks.

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Ok


I've spent most of the day on this problem (and another one you are also helping me on!)

The problem is such:

1. The initial snapshot downloads fine

2. If I add a proc to the publication, I need to recreate the snapshot - the next time it sync's I get the error listed earlier (about not being able to find the file etc)

3. If I mark the subscription for initilization, it works successfully

Sorry if I've been obtuse in explaining this. The only difference in my code in scenarios 2. and 3. is the addition of the following line:

subscription.Reinitialize(False)

All other parameters are the same - this is what is so strange...

4. Also - if I mark all subscriptions to be reinitialized (at the publisher) - it is able to download the snapshot ok next time we try and synchronise at the subscriber.


Bruce

|||

Hello Bruce,

1. Looks like you got a workaround already.

2. I still have no luck to repro your scenario at this moment but I will continuous to try.

3. Can you profile (if you prefer) the TSQLs which a "NEW" SP is added to the existing publication. Particularly when sp_addmergearticle is invoked, what is the value set for @.force_reinit_subscription? If you got "1", can you somehow modify the RMO code to make it "0" and see if this issue still occurs.

Thanks.

Leo

This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, February 15, 2012

Error Adding SQL Server Login Properties

Hello,
I have SQL 200 SP3 box that has a web app with a hard coded user; I
tried to re-add the user after it was deleted.
I now get the following error when trying to add the database access:
"Error 21002 [SQL-DMO] user 'unsername' already exists."
Any help would be greatly appreciated.
I fixed my issue by running the following:
use my_db;
go
sp_change_users_login AUTO_FIX, 'my_user'
go
Hulicat wrote:
> Hello,
> I have SQL 200 SP3 box that has a web app with a hard coded user; I
> tried to re-add the user after it was deleted.
> I now get the following error when trying to add the database access:
> "Error 21002 [SQL-DMO] user 'unsername' already exists."
>
> Any help would be greatly appreciated.

Error Adding SQL Server Login Properties

Hello,
I have SQL 200 SP3 box that has a web app with a hard coded user; I
tried to re-add the user after it was deleted.
I now get the following error when trying to add the database access:
"Error 21002 [SQL-DMO] user 'unsername' already exists."
Any help would be greatly appreciated.I fixed my issue by running the following:
use my_db;
go
sp_change_users_login AUTO_FIX, 'my_user'
go
Hulicat wrote:
> Hello,
> I have SQL 200 SP3 box that has a web app with a hard coded user; I
> tried to re-add the user after it was deleted.
> I now get the following error when trying to add the database access:
> "Error 21002 [SQL-DMO] user 'unsername' already exists."
>
> Any help would be greatly appreciated.

Error Accessing SSRS Web Applications - Service Unavailable/Invalid Version

We have an instance of SQL Server 2005 on a server that also has a SQL
Server 2000 instance. Neither was installed with Reporting Services. We went
back and installed Reporting Services on the 2005 instance only. Went
through the config tool with no problems and the virtual directories look
fine in IIS.
When we try to hit the Reports web page using IE, we get "Service
Unavailable." The service shows as "Started."
Event viewer shows two errors, which occur every 12 hours. The first says
"The report server database is an invalid version" (Event ID 117) and the
second says "Report Server Windows Service (MSSQLSERVER) cannot connect to
the report server dartabase" (Event ID 107).
The server has 2.0 of the framework intalled and the SSRS web applications
are pointing to ASP 2.0.
I googled around on these messages and the only resolutions I found
suggested that the Reporting Services config tool had not been run. It had
been run, and to play it safe I ran it again. But no luck.
Any suggestions? The server is running Windows Server 2003 SP1 and SQL
Server is version 9.0.3054.
Thanks in advance for any help.On Dec 6, 11:20 am, "CapCity" <sgomori at yahoo dot com> wrote:
> We have an instance of SQLServer2005 on aserverthat also has a SQLServer2000 instance. Neither was installed with Reporting Services. We went
> back and installed Reporting Services on the 2005 instance only. Went
> through the config tool with no problems and the virtual directories look
> fine in IIS.
> When we try to hit the Reports web page using IE, we get "Service
> Unavailable." Theserviceshows as "Started."
> Event viewer shows two errors, which occur every 12 hours. The first says
> "Thereportserverdatabase is an invalid version" (Event ID 117) and the
> second says "ReportServerWindowsService(MSSQLSERVER) cannot connect to
> thereportserverdartabase" (Event ID 107).
> Theserverhas 2.0 of the framework intalled and the SSRS web applications
> are pointing to ASP 2.0.
> I googled around on these messages and the only resolutions I found
> suggested that the Reporting Services config tool hadnotbeen run. It had
> been run, and to play it safe I ran it again. But no luck.
> Any suggestions? TheserverisrunningWindowsServer2003 SP1 and SQLServeris version 9.0.3054.
> Thanks in advance for any help.
The *WINDOWS* Service may not be running.
Start >> Administrative Tools >> Services >> SQL Server Reporting
Services (MSSQLSERVER)
Make sure that is started and working properly.|||"BM" <moore.brent@.gmail.com> wrote in message
news:c25281d0-9f47-41ff-844f-e6317ec42e09@.w40g2000hsb.googlegroups.com...
> On Dec 6, 11:20 am, "CapCity" <sgomori at yahoo dot com> wrote:
>> We have an instance of SQLServer2005 on aserverthat also has a
>> SQLServer2000 instance. Neither was installed with Reporting Services. We
>> went
>> back and installed Reporting Services on the 2005 instance only. Went
>> through the config tool with no problems and the virtual directories look
>> fine in IIS.
>> When we try to hit the Reports web page using IE, we get "Service
>> Unavailable." Theserviceshows as "Started."
>> Event viewer shows two errors, which occur every 12 hours. The first says
>> "Thereportserverdatabase is an invalid version" (Event ID 117) and the
>> second says "ReportServerWindowsService(MSSQLSERVER) cannot connect to
>> thereportserverdartabase" (Event ID 107).
>> Theserverhas 2.0 of the framework intalled and the SSRS web applications
>> are pointing to ASP 2.0.
>> I googled around on these messages and the only resolutions I found
>> suggested that the Reporting Services config tool hadnotbeen run. It had
>> been run, and to play it safe I ran it again. But no luck.
>> Any suggestions? TheserverisrunningWindowsServer2003 SP1 and SQLServeris
>> version 9.0.3054.
>> Thanks in advance for any help.
> The *WINDOWS* Service may not be running.
> Start >> Administrative Tools >> Services >> SQL Server Reporting
> Services (MSSQLSERVER)
> Make sure that is started and working properly.
The service is running. I even stopped it and restarted it, but still get
the same error.

error accessing rs web service

I am having problems accessing reporting services using the report viewer web service from a web application. We are getting the following error.
System.Net.WebException: The request failed with HTTP status 401: Access Denied.
Below is the code. The uncommented code works, but we don't want to hard code a user. The DefaultCredentials are coming up blank. Any suggestions on why this may be or what to do to correct would be appreciated.
<code>

Dim rsAsNew reportserver_dev.ReportingService

Dim itemAs reportserver_dev.CatalogItem

' gets users network creditentials for reporting services

'rs.Credentials = System.Net.CredentialCache.DefaultCredentials

' ***** to do: this is temporary to force authentication

Dim cacheAsNew System.Net.CredentialCache

cache.Add(New Uri(rs.Url), "Negotiate",New System.Net.NetworkCredential("user", "pwd", "domain"))

rs.Credentials = cache

</code>
Hi,
In your web.config is set <identity impersonate="true" /> ?
Regards
|||Hello creagan,
Is the reporting service on the same machine or on a remote machine? If the
report server is a remote machine, then using impersonation and CredentialCache.DefaultCredentials
doesn't work because of a one-hop limitation in NTLM authentication.
Authentication, Role-based Security, and SQL Reporting Services
Roadmap to Delegation

HTH,|||

Please try these links

http://support.microsoft.com/?id=306158
http://www.c-sharpcorner.com/UploadFile/chauhan_sonu57/ProgrammaticImpersonation02022006080545AM/ProgrammaticImpersonation.aspx?ArticleID=3aa21cd6-b867-4306-96ed-de0ba5930fa1
http://blogs.msdn.com/bimusings/archive/2005/11/18/494436.aspx

Regards,
Jimmy