w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Trouble Connecting to sql server Login failed. "The login is from an untrusted domain and cannot be used with Windows authentication"
Why not use a SQL Server account and pass both the user name and password? Here is the reason why. In short, it looks like you have an authentication issue. The problem with workgroups is there is no common Access Control List like Active Directory (AD). If you are using ODBC or JDBC, the wrong credentials are passed. Even if you create a local windows account (LWA) on the machine (SE) that has SQL Express installed (SELWA), the credentials that will be passed from your client machine (CM) will be CMLWA.

Categories : Sql Server

Connecting to SQL Server using windows authentication
A connection string for SQL Server should look more like: "Server= localhost; Database= employeedetails; Integrated Security=True;" If you have a named instance of SQL Server, you'll need to add that as well, e.g., "Server=localhostsqlexpress"

Categories : C#

Connecting to SQL Server via Windows Authentication with Java providing credentials
I'm pretty sure this is unsupported. When a user connects through a Windows user account, SQL Server validates the account name and password using the Windows principal token in the operating system. This means that the user identity is confirmed by Windows. SQL Server does not ask for the password, and does not perform the identity validation. Windows Authentication is the default authentication mode, and is much more secure than SQL Server Authentication. Windows Authentication uses Kerberos security protocol, provides password policy enforcement with regard to complexity validation for strong passwords, provides support for account lockout, and supports password expiration. A connection made using Windows Authentication is sometimes called a trusted connection,

Categories : Java

WebDAV Server Error 401.2, connection issue with Windows Authentication after pausing virtual server/domain controller
We figured out what was causing our issue although I may not be able to explain entirely why it mattered. In IIS there is a setting in the "HTTP Response Headers" under "Set Common Headers" called "Enable HTTP keep-alive". We check marked this option as true and our Windows Authentication started working again. It seemed to have something to do with the connection not staying open between requests and the application or IIS not realizing the connection was restarted during the SYNC operation.

Categories : Iis

Connecting to WCF service in Windows Phone 8 (C#) by using domain credentials
I don't have any phone development experience. Where is what I do at a C# Service Level. Uri uri = new Uri("http://whatever.com"); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); NetworkCredential networkCredentials = new NetworkCredential(); networkCredentials.Domain = "Domain"; networkCredentials.UserName = "User"; networkCredentials.Password = "Pass"; CredentialCache cc = new CredentialCache(); cc.Add(uri, "Basic", networkCredentials); //NTLM can be used here, but Basic usually works. request.Credentials = cc; request.Method = WebRequestMethods.Http.Get; using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { ... }

Categories : C#

Connecting to a Remote Server on a different domain -- how do I enter the username and password?
According to Microsoft it should be possible. You need to authenticate against the remote domain, though, e.g. like this: computer = "..." username = "OTHERDOMAINuser" password = "..." Set locator = CreateObject("WbemScripting.SWbemLocator") Set wmi = locator.ConnectServer(computer, "rootcimv2", username, password) wmi.Security_.ImpersonationLevel = 3

Categories : Vbscript

Java client connecting to PHP server for MySQL database with authentication
Create a PHP file that accepts POST. In your JAVA, try passing a custom header KEY:VALUE pair that's verified via your PHP file - or try to think of a more elaborate way. Then, post along the username and password to the PHP file: POST http://server.com/java-auth.php?user=username&pass=password for pseudo example. Then, have that PHP file return a JSON-encoded string or a serialized string... or go super fancy, and encrypt it all with public/private keys. Hope this helps :)

Categories : Java

How to handle error when login with different domain in windows authentication?
In IIS, make sure anonymous access is not selected, only integrated windows authentication needs to be selected. Also I assume you mentioned authentication and authorization tags under <system.web> section.

Categories : C#

Domain User Authentication in Windows Store Apps?
I was looking for this answer too. I discovered that you have to go to the package.appxmanifest and check off Enterprise Authentication and then you can use CredentialCache.DefaultNetworkCredentials in your app to get the username, but not the password.

Categories : Authentication

Test transition from Windows Authentication to SQL Server authentication
Your question is too general but here are some steps you should take. Create new sql login and only give necessary permissions to this user Update all connection strings in your application. If these are not consolidated in one config file now is the good time to do this. You can even consider creating a separate class that will handle this. Add login form to your app that will be shown at the application startup so that user can enter credentials Best way to test this is to simply disable your windows user in SQL Server and see if application is still running.

Categories : C#

sqlsrv error while connecting to mssql server 2008 on windows 2003 server
Two ways to try, first to check if the Native driver has the right version - is your server really a 32bit Version and not 84bit? The other thing is, to check if the extensions are actually loaded. To check that, create a file like "phpinfo.php" and put it in you folder for .htdocs. <?php // show phpinfo file phpinfo(); ?> The easy way is to search for it in the phpinfo-Page with Ctrl+F and "extension=php_sqlsrv_53_ts_vc9.dll"

Categories : PHP

C# Programmatic Remote Folder / File Authentication In Non-Domain Windows Environment
Impersonation works with Peer/LAN network as well. I got your typical home network with some machines on default "Workgroup" and some on a named one if I remembered doing it on the install. Here is the code I use from my IIS server app to access files on my other computer (without having to have the same user and password on both machines involved, copied from somewhere and modified for my use): using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Security.Principal; using System.ComponentModel; /// <summary> /// Class to impersonate another user. Requires user, pass and domain/computername /// All code run after impersonationuser has been run will run as this user. /// Remember to Dispose() afterwards. /// </summ

Categories : C#

change from windows authentication to sql server authentication
The following connectionString format should do the job. connectionString="user id=yourUsername; password=yourPassword;data source=yourServerName;initial catalog=yourDatabaseName;"

Categories : Sql Server

Can I use SQL Authentication to log into SQL Server 2008 that was set up with Windows authentication?
You need to alter the registry key HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLServer where MSSQL10.MSSQLSERVER is the name of your current instance. It should say "1" now, for Windows. Change it to "2", for Mixed. I believe the initial SA password at this point will be blank. However, it is possible that the SA password was set to something already, so you may not be able to login using SA even after altering the registry. You can read more at: http://www.mssqltips.com/sqlservertip/1441/correct-the-sql-server-authentication-mode-in-the-windows-registry/ Good luck.

Categories : Windows

Deploying MVC 3 website on Windows Server 2003 with Windows Authentication
What is the version of IIS you are using ? Could you try to force NTLM authentication and see whether it will change anything ? Followin technet article will tell you how to change to NTML http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/7258232a-5e16-4a83-b76e-11e07c3f2615.mspx?mfr=true. Please backup the server/iis configs before attempting any modifications to the metabase

Categories : Asp Net Mvc

How to connect to MS SQL Server database from ASP using windows authentication specifying a windows user
You've got at least 2 3 options here: Create an App Pool on your web server which runs as domain/usr and then assign your app to this app pool, and use integrated security. Your connection string will be Data Source=dbServer01;Initial Catalog=POS123;Integrated Security=SSPI; - i.e. drop the username and password - these are inherent in the AppPool's identity. or (assuming Mixed Mode security is enabled) ask your DBA's to create a new SQL User (just called usr) with the same permissions as domain/usr and then change your connection string to standard security, with User Id=usr If you enable impersonation (here and here), you can use the domain credential without changing the app pool identity. Note the point about securing cleartext passwords, and IME this typically also requires addition

Categories : Asp Net

Connecting Windows Phone 8 to Sql server
Well, to achieve your goal, I would do: Build a REST webservice with ASP.NET Web API (http://www.asp.net/web-api) which returns objects (those objects will be translated to json automatically). For example: public class MyObject { public string Content { get; set; } } Controller for it: public class TestController : ApiController { [HttpGet] public MyObject Example() { return new MyObject() { Content = "Hello World!" }; } } Use a HTTP client in your win phone project: HttpClient client = new HttpClient(); client.BaseAddress = new Uri("http://mywebservice.com"); client.DefaultRequest.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); using (var result = await client.GetStreamAsync("test/example")) { var serializer = new JsonSerializer(); //

Categories : C#

Connecting to smtp server windows C++
In the following line: sock = socket(AF_INET, SOCK_STREAM, 0); You do not specify a protocol. You should change it to sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); This is the kind of protocol you are going to want to establish with something such as a mailing service.

Categories : C++

Connecting to SQL Server from Visual Studio 2010 for windows phone environment
You can't directly interact with a SQL Server from a Windows Phone app. The best way would be to create a service layer around your database which exposes all the operations you need.This service will be called from the mobile app. The most popular technologies for doing so on the Microsoft stack are WCF and ASP.NET Web API. Which one you choose is up to you and depends on several factors. ref : http://social.msdn.microsoft.com/Forums/wpapps/en-US/a653ad41-59f7-41b7-82e8-3b2c76d7dec6/sql-server-connection-for-windows-phone-8

Categories : C#

Connect to SQL Server with windows authentication
If the company is inside a domain, and the user running the iis has permisions on the SQL Server, all you have to do is use windows authentication and that's it. Check out: http://msdn.microsoft.com/en-us/library/2xzyzb0f(v=vs.100).aspx

Categories : C#

How to use Basic Authentication to access Asp.Net MVC 4 Intranet Web API method which uses Windows Authentication from a Windows Service?
I had a similar scenario and I decided to create a new user type in our application called Service User. We created a service account in the domain and when we installed the windows service on the server (which was in the same network) we forced the windows service to run as the service account (with network domainusername and password). We have actually created 3 service accounts in our application, one for each environment: ServiceAccountDev, ServiceAccountUAT and ServiceAccountPROD and disabled/enabled each account as appropriate.

Categories : C#

ServiceStack Caching/Authentication with Windows Server
Windows Caching Redis and Memcached are both available for Windows but from a quite test the Redis binaries seem easier to use. You can download them from http://ruilopes.com/redis-setup/ To configure ServiceStack to use redis have a look on the ServiceStack wiki page MemoryCacheClient I'm making the assumption you are running ServiceStack on IIS MemoryCacheClient uses a ConcurrentDictionary to store cache entries. This means it is stored in the AppPool memory which is cleared everytime the AppPool recycles. By default AppPool recycles everytime the Web.config or bin folder changes and every 1740 minutes.

Categories : Authentication

Connect to SQL Server with Management Studio using Windows Authentication
The only elegant ways to connect to a SQL Server in another domain but still use Windows Authentication are: What you're already doing: runas /netonly Connecting via remote desktop and opening SSMS locally on the remote server

Categories : Sql Server

Set up Kerberos Authentication with Delegation on IIS 7 w/ Windows Server 2008
Try this: Move Negotiate to the top of the Providers' list. And, in the applicationHost.config file usually under C:WindowsSystem32inetsrvconfig, add useKernelMode="true" useAppPoolCredentials="true" to the <windowsAuthentication> tag under the <location> tag for your application, like below: <location path="YOUR_APPLICATION_PATH"> <system.webServer> <security> <authentication> <anonymousAuthentication enabled="false" /> <windowsAuthentication enabled="true" useKernelMode="true" useAppPoolCredentials="true"> <providers> <clear /> <add value="Negotiate" /> <add value="NTLM" /

Categories : Authentication

authorization username and password from sql server in windows authentication
Window Authentication Functionality to a C# Desktop Application http://code.msdn.microsoft.com/Add-Window-Authentication-833ba913

Categories : C#

How do I grant SeBatchLogon privileges to a domain account on a Windows server with Powershell?
Use ntrights.exe from the Windows Server 2003 Resource Kit Tools: ntrights +r SeBatchLogon -u mydomainatchuser

Categories : Powershell

Connect my Sql Server 2008 database to my Java Project with Windows Authentication
With the error you are getting "com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication", suggest that the issue is with the JDBC driver not with the database or the application code.. What version are you using, as per Microsoft forums, the issue is fixed with the version 1.2, can you get the latest version installed and try again. The latest version can be found at http://www.microsoft.com/en-in/download/details.aspx?id=11774 Reference: http://www.microsoft.com/en-in/download/details.aspx?id=11774

Categories : Java

Single-Sign-On from Windows Workstation to PHP script running on Linux server that is not part of the same domain
http://www.php.net/manual/en/book.ldap.php I actually just implemented a basic LDAP authentication script. This was my first draft of the script before I changed and messed with it to fit with my setup. This basically connects to the server, if not the scrpt is killed. Then tries to authenticate the given username and password, if not, it fails. Quick and simple. $ldapHost = "example2.com"; $ldapPort = 666; $ldapBaseDn = "ldap base dn here"; $username = "username"; $password = "password"; $ldapUserDn = "uid=$username,".$ldapBaseDn; echo "LDAP query test "; echo "Connecting ... "; $ldapConn = ldap_connect($ldapHost, $ldapPort) or die("Unable to connect to LDAP server: $ldapHost "); echo "Authenticating user ... "; $isValid = ldap_bind($ldapConn, $ldapUserDn, $password) or d

Categories : PHP

python pyodbc - connecting to sql server 2008 on windows/python2.7 but not on centOS6.32/python2.6.6
You don't have an odbc driver for sql server configured - you need to install and configure one. The drivers section on unixodbc's webpage suggests freetds, alternatively you could also try microsoft's own implementation. freedts should be installable using yum. The basic configuration then should look something like this: /etc/odbcinst.ini: [SQL Server] Description = FreeTDS driver for SQL Server Driver = /usr/lib/libtdsodbc.so Driver64 = /usr/lib64/libtdsodbc.so Now you should already be able to connect. For more detailled information on configuration, look here. edit: alternatively there are also other ways to connect to an sql server from python, like python-tds, pymssql and more...

Categories : Python

In ASP.NET is there an event fired on a Windows Authentication log in failure? (Logging the details of a Windows Authentication failure)
I was looking at the same issue, and looks like there is no events for windows authentication, even that Authenticate event is common for forms and windows. But I found a solution to this! http://www.codeproject.com/Articles/11202/Redirecting-to-custom-401-page-when-quot-Access-de UPDATE From original article protected void Application_EndRequest(Object sender, EventArgs e) { HttpContext context = HttpContext.Current; if (context.Response.Status.Substring(0,3).Equals("401")) { if(User.Identity.IsAuthenticated) { // this means user is authenticated, but 401 still returned // which means no access to page or whatever you are trying to access? } } } UPDATE2 I also found out that this solution doesn't work in all cases. I was testing in different envir

Categories : Asp Net Mvc

Connecting to root domain - AWS Route 53 EC2
AFAIK you can not create an A record at the zone apex, only an AWS-specific Alias type. The Alias can refer to an ELB, S3 website, CloudFront distribution or another Route 53 record set. You have a couple of options: a) put your instance behind an ELB, and create example.com as an Alias record pointing to your ELB. Or, b) Create example.com as an Alias which points to the www.example.com CNAME.

Categories : Amazon

Connecting GitLab to a purchased domain name
So, I have figured it out. On godaddy.com, I had to change the host. Go to your domain details page, and you will need to edit the host. At the top of the zone file, you will find a box that has, at the top, "A (Host)." You will need to edit this. There should already be a line that has an "@" symbol. Leave the symbol, and change the "Points To" column. If your server has a static IP, put it in here. If your server doesn't have a static IP, I recommend you get one. Next, you need to add the nameserver. That's it! Relatively simple, but just hard to discover. Hope I save some people some frustration. -Hunter A.

Categories : Misc

MVC4 Forms Authentication but Windows Authentication in Admin Area
Supporting both forms of authentication for one site is a little dicey. I would suggest setting up two separate sites, one for admin and one for the members that both point to the same database. Check out this discussion about the topic: Mixing Forms authentication with Windows authentication

Categories : Asp Net Mvc

Connecting XAMPP to a domain and adding files
XAMPP is software bundle containing cross OS solutions (X) for webserver Apache (A), MySQL database (M), and server-side language PHP (P) and Perl (P). If you got a domain you need to redirect it to IP on which this XAMPP server works. To do it call/mail your domain registrator (a company that sold you a domain) and ask about it. It involves DNS (Domain Name Server) configuration - ask them how to change DNS to direct it to your XAMPP server. PS To add files go to htdocs direcotry in your XAMPP instalation or whatever you defined to store files (and websites) and drop your files in there. As I can see you are not experienced in that kind of things so maybe ask company that sold you a domain name about "shared hosting"? It's preconfigured ready to go server where you send files over FTP

Categories : Mysql

Share Session Between two .net 4.0 web applications (domain and subdomain) using Windows Server AppFabric session cache SECURELY
Yes, AppFabic Session State provider can easily share session between applications. By default, data sent between cache clients and the cache cluster is encrypted and signed. In addition, any clients of the cache cluster must be specifically added to the allowed client account list via Grant-CacheAllowedClientAccount cmdlet. From this point of view, it' secure. I have two applications, one on a primary domain and the other on another domain. That's the problem.It's always usefull to review basic session concepts. As a session state provider, AppFabric uses SessionID to get/store session content in the distributed cache (Note : it's the same for all providers). By default, SessionID values are stored in a cookie. Cookies have a scope = the domain (and path) : They tell the browser t

Categories : Asp Net

Setting a post-authentication View for Windows Authentication
Create a custom AuthorizeAttribute like this: public class MyAuthorizeAttribute : AuthorizeAttribute { private UnitOfWork _unitOfWork = new UnitOfWork(); protected override bool AuthorizeCore(HttpContextBase httpContext) { var isAuthorized = false; var username = httpContext.User.Identity.Name; // Some code to find the user in the database... var user = _unitOfWork.UserRepository.Find(username); if(user != null) { // Check if there are Details for the user in the database if(user.HasDetails) { isAuthorized = true; } } return isAuthorized; } public override void OnAuthorization(AuthorizationContext filterContext) { if (filt

Categories : C#

Connecting to a Web Service using Client Certificate authentication
It appears that the server did not understand TLS. I had to specify SSLv3, via System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Ssl3;

Categories : C#

Hybrid of Windows Authentication and Forms Authentication in ASP.NET MVC 4
You need to use Action Filters for this purpose. You can extend the AuthorizeAttribute like this: public class MyAuthorizeAttribute : AuthorizeAttribute { private UnitOfWork _unitOfWork = new UnitOfWork(); protected override bool AuthorizeCore(HttpContextBase httpContext) { var isAuthorized = false; var username = httpContext.User.Identity.Name; // Some code to find the user in the database... var user = _unitOfWork.UserRepository.Find(username); if(user != null) { isAuthorized = true; } return isAuthorized; } public override void OnAuthorization(AuthorizationContext filterContext) { if (filterContext == null) { throw new ArgumentNullException("fil

Categories : Asp Net Mvc

Can I use the Integrated Security option in a connection string if I'm connecting to a remote machine that's not on a domain?
Integrated security will only work when the machines are on the same domain (or a different domain with a trust) this is because SQL server has to contact a domain controller to authenticate a windows logon, which it can only do if it is a member of a domain. Just being connected to the LAN is not enough as although the machine may be able to physically connect to the domain controller, it will not be able to authenticate users against it.

Categories : Sql Server

add product from one domain, to the cart of different domain(both are on same server)
The requirement is that both domains have to store the sessions at the same place. Then you have to make the client use the same session id on both domains, to do that, pass the session id in all links and redirects that go from one domain to another. <a href="http://xyz.com/cart.php?<?php echo SID ?>">cart</a>

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.