I cannot access my SQL database in a browser control created in my C# Windows
application program I can, however, access the database from an IE browser.
I get the ubiquitous "Login failed for NT AUTHORITY\NETWO RK SERVICE" error
message. I researched all the advice on the internet and tried to add an NT
AUTHORITY\NETWO RK SERVICE login to my database under the Security/Users tab
using SQL Server Mangement. However, there is no NT AUTHORITY\NETWO RK SERVICE
login in my SQL dialog, only an NT AUTHORITY\SYSTE M login. Why is that?
Secondly, I finally was able to add an NT AUTHORITY\NETWO RK SERVICE manually
to my database login and gave it all of the permissions but I still get the
error when accessing the database through my Windows browser control.
Below is my connection string.
Provider=SQLOLE DB; Data Source=Vista; Initial Catalog=Mydatab ase;Integrated
Security=SSPI";
Dave 6 1715
You always need to know and be aware of the account you're running under:
Here is some crappy debugging code.
I think the issue is you don't have sql server credentials for the user the
program is running under.
Go to Control Panel / Users and you can see a list of "built in" users that
a windows machine has.
private string FindIIdentity()
{
try
{
string returnValue = string.Empty;
WindowsIdentity ident = WindowsIdentity .GetCurrent();
returnValue = ident.Name;
try
{
returnValue += " on " + System.Environm ent.MachineName ;
}
catch (Exception ex)
{
}
return returnValue;
}
catch (Exception ex)
{
return "Error Finding Identity";
}
}
"Parrot" <Pa****@discuss ions.microsoft. comwrote in message
news:8C******** *************** ***********@mic rosoft.com...
>I cannot access my SQL database in a browser control created in my C# Windows
application program I can, however, access the database from an IE
browser.
I get the ubiquitous "Login failed for NT AUTHORITY\NETWO RK SERVICE" error
message. I researched all the advice on the internet and tried to add an
NT
AUTHORITY\NETWO RK SERVICE login to my database under the Security/Users
tab
using SQL Server Mangement. However, there is no NT AUTHORITY\NETWO RK
SERVICE
login in my SQL dialog, only an NT AUTHORITY\SYSTE M login. Why is that?
Secondly, I finally was able to add an NT AUTHORITY\NETWO RK SERVICE
manually
to my database login and gave it all of the permissions but I still get
the
error when accessing the database through my Windows browser control.
Below is my connection string.
Provider=SQLOLE DB; Data Source=Vista; Initial
Catalog=Mydatab ase;Integrated
Security=SSPI";
Dave
Thanks for your reply. I inserted your debug code and determined that my
user login was Vista\Dave under VISTA. I add Vista\Dave as a user for my
database and giving it full permission and reran my application and I still
get the NT AUTHORITY error. There has to be something to with the browser
control as I don't get this error in my other Window dialogs in this
application.
Dave
"sloan" wrote:
>
You always need to know and be aware of the account you're running under:
Here is some crappy debugging code.
I think the issue is you don't have sql server credentials for the user the
program is running under.
Go to Control Panel / Users and you can see a list of "built in" users that
a windows machine has.
private string FindIIdentity()
{
try
{
string returnValue = string.Empty;
WindowsIdentity ident = WindowsIdentity .GetCurrent();
returnValue = ident.Name;
try
{
returnValue += " on " + System.Environm ent.MachineName ;
}
catch (Exception ex)
{
}
return returnValue;
}
catch (Exception ex)
{
return "Error Finding Identity";
}
}
"Parrot" <Pa****@discuss ions.microsoft. comwrote in message
news:8C******** *************** ***********@mic rosoft.com...
I cannot access my SQL database in a browser control created in my C#
Windows
application program I can, however, access the database from an IE
browser.
I get the ubiquitous "Login failed for NT AUTHORITY\NETWO RK SERVICE" error
message. I researched all the advice on the internet and tried to add an
NT
AUTHORITY\NETWO RK SERVICE login to my database under the Security/Users
tab
using SQL Server Mangement. However, there is no NT AUTHORITY\NETWO RK
SERVICE
login in my SQL dialog, only an NT AUTHORITY\SYSTE M login. Why is that?
Secondly, I finally was able to add an NT AUTHORITY\NETWO RK SERVICE
manually
to my database login and gave it all of the permissions but I still get
the
error when accessing the database through my Windows browser control.
Below is my connection string.
Provider=SQLOLE DB; Data Source=Vista; Initial
Catalog=Mydatab ase;Integrated
Security=SSPI";
Dave
Yammers.
I don't know then.
My last check would be:
Security / Logins
Databases / MyDatabase / Security / Users
Those are 2 different things in Sql Server.
Now, when you create the login, and ALSO ADD THE "MyDatabase ", the "user"
will be auto created.
But I'd check both of those places.
But I don't know. At least you know which user is trying to access the db
under the integrated model.
"Parrot" <Pa****@discuss ions.microsoft. comwrote in message
news:16******** *************** ***********@mic rosoft.com...
Thanks for your reply. I inserted your debug code and determined that my
user login was Vista\Dave under VISTA. I add Vista\Dave as a user for my
database and giving it full permission and reran my application and I
still
get the NT AUTHORITY error. There has to be something to with the browser
control as I don't get this error in my other Window dialogs in this
application.
Dave
"sloan" wrote:
>>
You always need to know and be aware of the account you're running under:
Here is some crappy debugging code.
I think the issue is you don't have sql server credentials for the user the program is running under.
Go to Control Panel / Users and you can see a list of "built in" users that a windows machine has. private string FindIIdentity()
{
try
{ string returnValue = string.Empty;
WindowsIdentit y ident = WindowsIdentity .GetCurrent();
returnValue = ident.Name;
try
{
returnValue += " on " + System.Environm ent.MachineName ;
}
catch (Exception ex)
{
}
return returnValue;
} catch (Exception ex)
{
return "Error Finding Identity";
}
}
"Parrot" <Pa****@discuss ions.microsoft. comwrote in message news:8C******* *************** ************@mi crosoft.com...
>I cannot access my SQL database in a browser control created in my C# Windows
application program I can, however, access the database from an IE
browser.
I get the ubiquitous "Login failed for NT AUTHORITY\NETWO RK SERVICE"
error
message. I researched all the advice on the internet and tried to add
an
NT
AUTHORITY\NETWO RK SERVICE login to my database under the Security/Users
tab
using SQL Server Mangement. However, there is no NT AUTHORITY\NETWO RK
SERVICE
login in my SQL dialog, only an NT AUTHORITY\SYSTE M login. Why is that?
Secondly, I finally was able to add an NT AUTHORITY\NETWO RK SERVICE
manually
to my database login and gave it all of the permissions but I still get
the
error when accessing the database through my Windows browser control.
Below is my connection string.
Provider=SQLOLE DB; Data Source=Vista; Initial
Catalog=Mydatab ase;Integrated
Security=SSPI";
Dave
It really doesn't make any sense. I am getting an error on a login for NT
AUTHORITY yet my Window Identity is Vista\Dave. I think the only way I can
get around it is to provide a user id and password in my connection instead
of using the Integrated Security=SSPI. Looks like a bug to me but I can't
believe I am the only person with this problem.
Dave
"sloan" wrote:
Yammers.
I don't know then.
My last check would be:
Security / Logins
Databases / MyDatabase / Security / Users
Those are 2 different things in Sql Server.
Now, when you create the login, and ALSO ADD THE "MyDatabase ", the "user"
will be auto created.
But I'd check both of those places.
But I don't know. At least you know which user is trying to access the db
under the integrated model.
"Parrot" <Pa****@discuss ions.microsoft. comwrote in message
news:16******** *************** ***********@mic rosoft.com...
Thanks for your reply. I inserted your debug code and determined that my
user login was Vista\Dave under VISTA. I add Vista\Dave as a user for my
database and giving it full permission and reran my application and I
still
get the NT AUTHORITY error. There has to be something to with the browser
control as I don't get this error in my other Window dialogs in this
application.
Dave
"sloan" wrote:
>
You always need to know and be aware of the account you're running under:
Here is some crappy debugging code.
I think the issue is you don't have sql server credentials for the user
the
program is running under.
Go to Control Panel / Users and you can see a list of "built in" users
that
a windows machine has.
private string FindIIdentity()
{
try
{
string returnValue = string.Empty;
WindowsIdentity ident = WindowsIdentity .GetCurrent();
returnValue = ident.Name;
try
{
returnValue += " on " + System.Environm ent.MachineName ;
}
catch (Exception ex)
{
}
return returnValue;
}
catch (Exception ex)
{
return "Error Finding Identity";
}
}
"Parrot" <Pa****@discuss ions.microsoft. comwrote in message
news:8C******** *************** ***********@mic rosoft.com...
I cannot access my SQL database in a browser control created in my C#
Windows
application program I can, however, access the database from an IE
browser.
I get the ubiquitous "Login failed for NT AUTHORITY\NETWO RK SERVICE"
error
message. I researched all the advice on the internet and tried to add
an
NT
AUTHORITY\NETWO RK SERVICE login to my database under the Security/Users
tab
using SQL Server Mangement. However, there is no NT AUTHORITY\NETWO RK
SERVICE
login in my SQL dialog, only an NT AUTHORITY\SYSTE M login. Why is that?
Secondly, I finally was able to add an NT AUTHORITY\NETWO RK SERVICE
manually
to my database login and gave it all of the permissions but I still get
the
error when accessing the database through my Windows browser control.
Below is my connection string.
Provider=SQLOLE DB; Data Source=Vista; Initial
Catalog=Mydatab ase;Integrated
Security=SSPI";
Dave
on 29-7-2008, Parrot supposed :
Thanks for your reply. I inserted your debug code and determined that my
user login was Vista\Dave under VISTA. I add Vista\Dave as a user for my
database and giving it full permission and reran my application and I still
get the NT AUTHORITY error. There has to be something to with the browser
control as I don't get this error in my other Window dialogs in this
application.
Dave
Is this "Vista" (from "Vista\Dave ") a domain or your local machine?
If it is a domain, does your database server have access to the same
domain?
If it is your local machine, then that database server will not know
about that account. Best to use SqlServer login then (which you need to
enable explicitly in SqlServer as it is disabled by default). You will
need to specify username and password in your connectionstrin g.
Hans Kesting
The problem is on my local machine and I agree that the only way out of this
problem is to use a user id and password in my connection string. It's not
want I want to do as that requires more programming maintenance but I don't
see any other way around this problem. In summary, I feel this problem is a
bug in disguise and has wasted an awful lot of my time and others trying to
find a solution to something that should be simple.
Dave
"Hans Kesting" wrote:
on 29-7-2008, Parrot supposed :
Thanks for your reply. I inserted your debug code and determined that my
user login was Vista\Dave under VISTA. I add Vista\Dave as a user for my
database and giving it full permission and reran my application and I still
get the NT AUTHORITY error. There has to be something to with the browser
control as I don't get this error in my other Window dialogs in this
application.
Dave
Is this "Vista" (from "Vista\Dave ") a domain or your local machine?
If it is a domain, does your database server have access to the same
domain?
If it is your local machine, then that database server will not know
about that account. Best to use SqlServer login then (which you need to
enable explicitly in SqlServer as it is disabled by default). You will
need to specify username and password in your connectionstrin g.
Hans Kesting This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dave Holmes |
last post by:
Is there a way to keep an other application from opening a link in a
browser where I am running an ASP application?
For example, I have an ASP application open in a browser. If I click on
a link in an email message, Outlook "hijacks" the open browser and
opens opens the link in it. Is there a way to prevent this? To somehow
identifiy that browser window as "off limits" to another app?
Thanks.
|
by: Ryan Ritten |
last post by:
Hey,
I just started working at this new company and they gave me a simple
database project to start with. yet I am starting to look like an
idiot cause I can't even seem to connect to the MS Access DB with ASP.
I already went into Data Sources (ODBC) with windows Control panel and
set up a DSN. I don't think that is the problem. I am no expert at
all at asp...
|
by: Al |
last post by:
hi, I am new to asp.net. I have a question about
Marshelling b/w client browser and web server(database). I
heared that it is better to minimize going back and forth
b/w client browser and the server.This will increase
performance and improve scallability.
With asp.net, using server controls. It seems every action
at the client browser require a trip to the server, for
instance, page_load ( to fill combo boxes), or the event
of the combo...
|
by: Daniel |
last post by:
Hi,
I have opened the word file from database and display in web browser.
When i close the browser, i wan to update the changes into the database.
and i dont know how to achieve it.
I oni know when i upload the file, i need to use filefield control, but now
the situation is different. I cant automatically read the file location and
filename as the filefield input.
how to achieve it? any ideas?
|
by: Steve Franks |
last post by:
In ASP.NET 2.0 you can now apparently do this:
<asp:label runat="server" text="some browser" IE:text="any IE browser"
IE5:text="the IE 5 browser" PIE:text="the Pocket PC browser" />
Now the tokens "IE5" and "PIE" are coming from the updated browser
capabilities component.
I'd like to do the same thing, but create my own tokens that have nothing to
do with the browser capabilities component because I love the convenience
this offers.
| |
by: shil |
last post by:
I have a server side button that needs to do some preperation and
afterwards, if everything goes well, open a new browser with a specific
url.
I know how to execute javascript from a server side control, adding the
javascript to the attributes. I need to open the browser window AFTER
the code behind event is finished.
For example I have two text boxes on the form, whose values I want to
send as parameters to the URL that I want to...
|
by: dennist685 |
last post by:
Can't open Northwind
I remembered doing walkthrough using Northwind. However it wasn't an http
project but a file project using the development server. Northwind allowed
me to add, edit and insert, and the web page looked fine.
I opened a simple project just to see whether I could get my sqlserver on
the internet. (vs studio 2005, sqlserver 2005)
|
by: jannordgreen |
last post by:
I try to run http://localhost/scroller/scrollertest.asp in my IE 6
browser.
The asp program tries to connect to a MS Access 97 database.
The program works when the database is sitting on any local drive, but
when I put it on a network drive I get this error message:
Error Type:
Microsoft JET Database Engine (0x80004005)
|
by: tommymo |
last post by:
Hi everyone I'm new to this site and the world of ASP.Net C# programming. I have been learning controls and integrating them with a SQL database. So far I have been able to move along and understand static controls. However I would like to move on to attempt to create some dynamic controls. So I set out to work with a radiobuttonlist questionnaire. I have a database and in that DB I have 2 tables one which holds the questions and the other...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |