Showing posts with label schema. Show all posts
Showing posts with label schema. Show all posts

Thursday, March 22, 2012

error: 26 - Error Locating Server/Instance Specified

Hi

I have setup the membership schema on a hosted server using the asp_regsql.exe tool fine. I have setup roles/memberships using the website adminitraion tool and i have checked that its all being entered into my hosted MSSQL server. I have also setup my web.config file to point to the hosted server and all seems to be connecting ok! When i test/debug my project locally (using the F5 key), my login box works fine!

How ever, i have now uploaded my project to my hosted server. If i put an incorrect login, then i get the usual 'Your login attempt was not successful. Please try again.' - So i know its connecting to the right database. How ever, when i enter the correct login details, i get the following error:

An error has occurred while establishing a connection tothe server. When connecting to SQL Server 2005, this failure may becaused by the fact that under the default settings SQL Server does notallow remote connections. (provider: SQL Network Interfaces, error: 26- Error Locating Server/Instance Specified)

...if its connecting to the same database fine when i test it from my local machine, why will it not work when i test it from my hosted server?

thanks

Hi

I've got it working now, how ever the problem seems to be somthing to with trying to access a page which is not in the root. I placed a new folder called 'admin' into my root folder. Inside the admin folder i placed a login.aspx and a default.aspx page.

In my web.config i placed:

<authentication mode="Forms">
<forms loginUrl="4dm1n/login.aspx" />
</authentication>

When logging on using this folder system is when the error occurs!

Any ideas what i need to change in order to get the scope right?

|||

found the problem - I hadn't declared the roleManager provider, eg

<roleManager enabled="true" defaultProvider="CustomizedRoleProvider">
<providers>
<add name="CustomizedRoleProvider"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="BVDB" />
</providers>
</roleManager>

duh!

Friday, February 24, 2012

Error while trying to execute a user defined function

Hi,

I'm working on SQL SERVER 2005 Standard edition.

I created a user defined function on the dbo schema.

Is it possible to invoke a user defined function in a select clause only with the name of this function without precising the name of the schema.

if my function is called TOTO(), can i execute the command :

SELECT TOTO()

go

Actually when i try to execute this command i have the following error message :

Message 195, level 15, state 10 :

'TOTO' is not a known built-in function name option.

Can someone help me to solve this issue ?

try

select dbo.toto()

|||

I know that it works but i want to know if it's possible to execute this function without specifying the schema just like this :

SELECT toto()

go

|||

Locolito:

The response to your question is no: WIth a scalar function you must supply the "schema" qualifier -- such as dbo; however, the schema qualifier is not required with a table function.


Dave