Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts

Monday, March 19, 2012

Another SQL script question.

Hey all,

How do i make sure that the local machine aspnet user account has privilages after installing my sql script on a local machine. ( this script gets run during my vb.net setup project. )

i was thinking about adding the user to the sql script its self. but i am unsure how to do this.

if anyone could help i would be greatly appreciative.

TIA

-Chris-Check out this link.

The link is for MSDE but applies to Sql Server too. It shows the syntax for adding new users to a database server and granting them access to specific databases.|||Thanks for you reply.

the syntax for adding a user assumes you know the full nt user account info. correct?

domain\user account.

what i would like to do is add the local machine\aspnet account. without knowing what the name of the local machine is.

if you have suggestion, please let me know.

TIA

Chris.|||I've gotten around that problem by using Sql Server authentication instead of a trusted connection.


-- Create Sql authentication login for 'SomeName'
EXEC sp_addlogin @.loginame='SomeName',@.passwd='SomePassword',@.defdb=N'SomeDefaultDb'
-- and making sure you are executing from 'SomeDatabase' grant access to 'SomeName' to the database 'SomeDatabase'
EXEC sp_grantdbaccess 'SomeName'

There is probably some server side property or method you can call that will tell you who the ASPNET user is running as (e.g., domain\ASPNET) which would allow you to use the other syntax to create a trusted connection.

Sunday, February 12, 2012

Analysis Services connexion problem using AMO via ASP.NET 2

Hi,

I've got a strange problem.
I'm developing an ASP.NET application connecting to an Analysis
Services 2005 database.

On my developpement PC I can run the web site virtually and my
connexion is ok. I can see all the databases running under my server.
BUT, when I deploy the site on the server, even if the connexion is a
success, I can't see any of my databases.

Concretly, the code looks like :

Dim oServeur As Microsoft.AnalysisServices.Server
oServeur = New Microsoft.AnalysisServices.Server
oServeur.Connect("ServerName") ' I do not type "(local)"

This part of the code is ok both on developpement and server side.

But If I add this :

My.Response.Write(oServeur.DataBases.Count)

The response is "2" on application developpement side and
"0" on the server side ...

Can someone help me please ?

This very much looks like the permissions problem. Check the security under which your ASP application is running. Check the security on the virtual directory for your application.

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

Analysis Services connexion problem using AMO via ASP.NET 2

Hi,

I've got a strange problem.
I'm developing an ASP.NET application connecting to an Analysis
Services 2005 database.

On my developpement PC I can run the web site virtually and my
connexion is ok. I can see all the databases running under my server.
BUT, when I deploy the site on the server, even if the connexion is a
success, I can't see any of my databases.

Concretly, the code looks like :

Dim oServeur As Microsoft.AnalysisServices.Server
oServeur = New Microsoft.AnalysisServices.Server
oServeur.Connect("ServerName") ' I do not type "(local)"

This part of the code is ok both on developpement and server side.

But If I add this :

My.Response.Write(oServeur.DataBases.Count)

The response is "2" on application developpement side and
"0" on the server side ...

Can someone help me please ?

This very much looks like the permissions problem. Check the security under which your ASP application is running. Check the security on the virtual directory for your application.

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