w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

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#

windows azure ACS confirmation for user credentials
There's no way to do this other than signing the user out and making them sign back in again. Even that, though, won't guarantee a password entry in all cases. If ADFS is configured for integrated auth (Kerberos), and the user is on a domain joined machine, they may never have entered their credentials and there's nothing you can do to force them to.

Categories : Asp Net Mvc

Is it possible to call a c# WebService with current windows user credentials?
I dont know your requirements and your environment, but couldn't you upload the files directly from the windows client using CSOM? Here's a link on how to setup constrained delegation: http://msdn.microsoft.com/en-us/library/ff650591.aspx#_Step_7:_Impersonate.

Categories : C#

Using Git Gui Windows - How do you save user credentials - Username and Password
One solution is to use the GitHub for Windows application: it will store your credentials for you, as mentioned in this GitHub help page. But it also adds: If you don't want to use GitHub for Windows, you can download the helper for your OS here: Windows Vista, 7, & 8 (.NET 4.0 required) Unzip the file and run the git-credential-winstore.exe program inside. This will start up the helper and update your git config to use it. Tip: The credential helper only works when you clone an HTTPS repository URL. If you use the SSH repository URL instead, SSH keys are used for authentication. So you don't need to create yourself a .git-credentials file: the git-credential-winstore.exe program will guide you through it.

Categories : Github

UnboundID LDAP SDK bind using current user's windows credentials
You need to use IWA authentication http://en.wikipedia.org/wiki/Integrated_Windows_Authentication and then to retrieve the user information using UnboundID's LDAP SDK

Categories : Java

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

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 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++

Retrieve Credentials from Windows Credentials Store using C#
There is a Nuget library that I've been using called CredentialManagement http://nuget.org/packages/CredentialManagement/ The usage is pretty simple. I wrapped it a little but probably didn't need to: public UserPass GetCredentials() { var cm = new Credential {Target = CredentialName}; if (!cm.Exists()) return null; cm.Load(); var up = new UserPass(cm); return up; } public bool SetCredentials(UserPass up) { var cm = new Credential {Target = CredentialName, PersistanceType = PersistanceType.Enterprise, Username = up.UserName, Password = up.Password}; return cm.Save(); } public void RemoveCredentials() { var cm = new Credential { Target = CredentialName }; cm.Delete();

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#

Deploying and SQL Server 2005 Express connecting for a standard user
My aim was to do software ready installation with SQL available for everyone standard Users. Finally, I used MS Database Publishing Wizard 1.1 and not Server Management Studio Express 2005 or 2012 to make scripts for databases with data and schema for repository data. Solution for deploying at different platforms was by adding the following lines at the beginning of scripts: CREATE USER [Users] FOR LOGIN [BUILTINUsers] GO exec sp_addrolemember db_datareader, Users go exec sp_addrolemember db_datawriter, Users go

Categories : SQL

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

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

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

PayPal iOS sdk allow user to pay with old credentials even if user changes the password/pin using sandbox
moka, I think that the scenario you describe is okay as is. Within your app, the user logs in to her PayPal account, pays you, and chooses to not log out from PayPal. Later, within your app she remains logged in to her PayPal account, even though elsewhere she has changed her password. And therefore she can still pay you from this account. That all seems fine to me. Regarding your second question: When you call [PayPalPaymentViewController initWithClientId:receiverEmail:payerId:payment:delegate:], the SDK uses the payerId to determine whether this is a new user or a returning user. So if you change the payerId each time you call the SDK, then each time this will be interpreted as a new user, who will therefore require a fresh PayPal login. (For example, you could set payerId to somet

Categories : Paypal

Get Windows User Account Name using Java from Server Side
Either request.getRemoteUser() (returns String of username) or request.getUserPrincipal() (returns Principal object that contains username) should provide you with the username.

Categories : Java

Prevent windows admin user from reading a SQL Server database
I do not believe that there is anyway to prevent an database user from viewing or otherwise altering a database installed on a SQL Server instance to which they have administrative access. However, it is possible to make it very difficult (but not impossible) to view or modify stored procedures. Microsoft uses this approach with their GP accounting software. To create stored procedures that cannot be reverse engineered easily, create them with the ENCRYPTION option. See http://msdn.microsoft.com/en-us/library/ms187926.aspx for more detailed info.

Categories : Database

C# Windows Service Invalid credentials
I assume you are reading files from a Windows share, like \COMPUTER2SharePathfile.ext. Account under which the server runs must be able to Access the network, Authenticate with the domain controller Able to logon to COMPUTER2 from the network (assigned via Control Panel->Admin tools->Local Security Policy). Have access rights to the share in question. LocalSystem and LocalService fail at #1. No network access. NetworkService gives you #1, but fails on #2 - it's a local account and domain controller does not know about it. What you need is to run the service under a specific domain acount, not local account, and configure that account to be able to logon remotely to COMPUTER2 and have read access to share Share. Alternatively, you may expose your files via different protocol that

Categories : C#

MVC 4 / IIS 7.5 - Prompting for windows authentication credentials
The issue is likely with your browser configuration. Browsers don't allow all sites to use NTLM by default. IE only allows sites in the Intranet zone to authenticate using NTLM and it seems Chrome has replicated that behaviour by now. So, to get your site working go to the Internet Options in Internet Explorer and add your domain to the Intranet sites.

Categories : Asp Net Mvc

Using file_put_contents on android with php server writes a file, but a Windows user using a USB cable to the device cant see it
Maybe you can create a file with windows, check the owner of the windows file and then create a file with "file_put_contents" and check their owner. Then you can change the owner of the file to the windows user, if the web user is the root. Or try to use 0777 as chmod ;) Give it a try ...

Categories : PHP

Enable Remote Connections on Windows Server 2012 via AWS User Data Field
I ended up doing the following: Stop the instance, detach the root volume and attach it as another partition on another Windows instance. Once attached, go to disk management and set it online, mount the registry hive and make the proper changes. Navigate to the following location in the registry HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server In the right pane, locate a REG_DWORD value named fDenyTSConnection. Double-click on fDenyTSConnection and change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled). If the server was placed in drain mode, then locate a REG_DWORD value named TSServerDrainMode and change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled). Unmount registry, set t

Categories : Powershell

Validate domain user credentials with .NET 2
You can use NetworkCredential.Domain Property The following code example uses the Domain property to set the domain associated with the credentials // Create an empty instance of the NetworkCredential class. NetworkCredential myCredentials = new NetworkCredential("", "", ""); myCredentials.Domain = domain; myCredentials.UserName = username; myCredentials.Password = password; // Create a WebRequest with the specified URL. WebRequest myWebRequest = WebRequest.Create(url); myWebRequest.Credentials = myCredentials; Console.WriteLine(" User Credentials:- Domain: {0} , UserName: {1} , Password: {2}", myCredentials.Domain, myCredentials.UserName, myCredentials.Password); // Send the request and wait for a response. Console.WriteLine(" Request to Url is sent.Waiting for r

Categories : C#

check user credentials in django
Well its simple: from django.shortcuts import get_object_or_404 student = get_object_or_404(Student, pk=student_id, user__id=request.user.id) This will raise 404 Exception if user trying to access other user profile or action. As Timmy O'Mahony suggested you even don't need to disclose student id in the url (if it is not necessary). Just get the currently logged in user in request.user and then use that to get the student profile: def my_student_view(request): user = request.user student = Student.objects.get(user__id=user.id)

Categories : Python

How to pass user credentials to web service?
You can try to genereate your service client proxy using the method mentioned here. Once you have an instance of your WCF client proxy, it will have a property ClientCreditials which you can populate as needed. Hope this helps.

Categories : C#

Batch File Connecting to Server and execute program install on connected server
Here's a little code to help you connect to the SQL server and interrogate the SQL version. @ECHO OFF SQLCMD /? > nul 2> nul IF ERRORLEVEL 1 ECHO.SQLCMD not found on this machine & PAUSE & GOTO :eof SET SQLCmdLine=SQLCMD -b -w400 REM use something like the next line for NT authentication; second line for SQL authentication REM for NT SET SQLCmdLine=%SQLCmdLine% -E -S "YourServerName" REM for SA SET SQLCmdLine=%SQLCmdLine% -U "YourSQLUserName" -P "YourSQLPassword" -S "YourServerName" SET Database=YourDatabaseName REM I will use NT Authentication for this example SET SQLCmdLine=%SQLCmdLine% -E -S "(local)" SET TestSQLCmdLine=%SQLCmdLine% -h-1 -d "%Database%" REM this will get the SQL version %TestSQLCmdLine% -Q "SELECT @@VERSION" | FINDSTR /v "rows affected" REM this will

Categories : SQL

C++/Qt : How to invoke OS Windows Security dialog for proxy credentials?
I am able to show WindowsSecurity dialog to ask for Proxy credentials. Here is the code. Will have to fine tune it bit but it is working. void getCredentials(const char * proxyIp, int proxyPort, char * proxType, QString &user, QString &password) { Log.info("Credentials", L"About to read credentials for [%hs] [%d] [%hs]",proxyIp,proxyPort,proxType); HRESULT hr = S_OK; DWORD dwResult; PVOID pvInAuthBlob = NULL; ULONG cbInAuthBlob = 0; PVOID pvAuthBlob = NULL; ULONG cbAuthBlob = 0; CREDUI_INFOW ui; ULONG ulAuthPackage = 0; BOOL fSave = FALSE; TCHAR pszName[CREDUI_MAX_USERNAME_LENGTH+1]; TCHAR pszPwd[CREDUI_MAX_PASSWORD_LENGTH+1]; TCHAR domain[CREDUI_MAX_DOMAIN_TARGET_L

Categories : C++

Validating user's API credentials - PayPal DoDirectPayment
PayPal Dont have any External API to validate the API Credentials alone. instead. You can Use the Express Checkout SETEXPRESSCHEKOUT API to call with very Minimal data and the API credenitals, which will validate the API Crenditials and will generate a Token. If you get a Token it means the API Credenitials is correct. This will not do any money Movement happpens with this API Call. PP have this API avaiable in both NVP and SOAP format.

Categories : Api

Paypal integration in php by storing user credentials
You wouldn't store the buyer's PayPal credentials (because that's about the worst crime you can commit in internet security), but you can create a billing agreement with the buyer. The billing agreement would allow you to charge the buyer, at a later date, without having to send the buyer to PayPal again to approve the payment. This page tells you how to do it: https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/integration-guide/ECReferenceTxns/

Categories : Paypal

C# SQL Server Login Credentials
Simply get rid of Trusted_Connection=yes;. It's ignoring the User ID and Password parameters because you're telling it to use your domain credentials. Now, the error itself is saying that your domain user doesn't have a Login to the SQL Server.

Categories : C#

Laravel 4: Auth credentials with two optional value to user type
Apply some groups to your users, add the user to a group and validate on that. ( Or even, apply ACL to groups, and check on that ) Is the future requires more types of users you can just add them to a group instead of altering your $creds array.

Categories : PHP

Security model: log in to third-party site with user's credentials
To state the obvious: The important thing here is of course to not let an attacker on your site get access to all the cookies. You cannot completely protect against this, since your service will need access to the cookies (in unencrypted form) regularly. An attacker that has completely compromised your server will in theory be able to do anything your service can do, so if it is possible for your service to get access to the cookies, then an attacker with all rights will also be able to get access to them. If you still want to do this, you should 1) make it more difficult for an attacker to get access to the cookies Just to give you an example of how you can think about this: If your system is compromised, it is likely that the attacker will get access to your file system. If the cooki

Categories : Security

Best practices for persisting user credentials in a Backbone.js based app?
I've used cookies to hold on to user credentials object and that doesn't work too badly for the most part, although it can get a bit messy, and I'm not 100% sure how secure it is. Store your user authentication in a cookie, and check for it when the router gets initialized. If the data is there, throw your authentication information onto your global application object app.user or something of the like.

Categories : Spring

Posting user credentials in SAML to a service provider
This use case is commonly referred to as Service Provider Initiated SSO (SP-Init SSO) in SAML 2.0 and is fairly common. You can find a number of resources that outline the flow a little more succinctly - http://documentation.pingidentity.com/display/PF70/SP-Initiated+SSO--Redirect-POST#SP-InitiatedSSO--Redirect-POST-1070862 https://developers.google.com/google-apps/sso/saml_reference_implementation Also, see Section 4.1.2 of the SAML 2.0 Tech Overview document - https://www.oasis-open.org/committees/download.php/11511/sstc-saml-tech-overview-2.0-draft-03.pdf HTH - Ian

Categories : Asp Net

Powershell remoting - Policy does not allow the delegation of user credentials
I finally got it to work thanks to this page. It provides a script that sets the required credential delegation policies by setting the appropriate registry keys directly. Once I ran that script with admin privileges, I was able to successfully establish a CredSSP connection to myserver: Enable-WSManCredSSP -Role client -DelegateComputer *.mydomain.com $allowed = @('WSMAN/*.mydomain.com') $key = 'hklm:SOFTWAREPoliciesMicrosoftWindowsCredentialsDelegation' if (!(Test-Path $key)) { md $key } New-ItemProperty -Path $key -Name AllowFreshCredentials -Value 1 -PropertyType Dword -Force $key = Join-Path $key 'AllowFreshCredentials' if (!(Test-Path $key)) { md $key } $i = 1 $allowed |% { # Script does not take into account existing entries in this key New-ItemProper

Categories : Powershell

How to store custome user login credentials in asp.net mvc4?
You can use ASP.Net membership provider to specify access for different roles or users. To require users to login, use: [Authorize] public class YourController : Controller // Or [Authorize] public ActionResult YourAction() To restrict access for specific roles, use: [Authorize(Roles = "Admin, User")] public class SomeController : Controller // Or [Authorize(Roles = "Admin, User")] public ActionResult SomeAction() And to restrict access for specific users, use: [Authorize(Users = "ABC1, ABC2")] public class SomeController : Controller // Or [Authorize(Users = "ABC1, ABC2")] public ActionResult SomeAction() For more please have a look on http://www.codeproject.com/Articles/288631/Secure-ASP-NET-MVC3-applications Please feel free to ask further specific question. Thanks.

Categories : C#

Why is Azure deployment slower on Windows 2012 Server than on Windows 2008 Server
http://social.msdn.microsoft.com/Forums/windowsazure/en-us/7cf664b0-5876-4d6a-b54d-fda46c544c6f/azure-deployment-slower-with-w2012-server-than-w2008-server-or-w2008-server-r2?forum=windowsazuretroubleshooting: 'I tried with .NET 4.5 with the same results. I think is something related to Azure SDK 1.7 & 2.0 Programmatically configure Azure cache client' Answer by Jordi Torra It seems to be a problem with the Azure SDK 1.7 & 2.0.

Categories : Asp Net

How to change folders permission to the current user by using admin credentials?
Impersonation will solve your problem. When you execute the code within the impersonated context, logic placed within that context will be executed with the previlege of the impersonated user. Following class reards the impersonation configuration values from the web.config file. You can modify it read from app.config or whatever the source. Required configurations User Name Password Domain Name Impersonation Class public class Impersonator : IDisposable { #region Win32 Advanced API calls /// <summary> /// Logons the user. /// </summary> /// <param name="lpszUserName">Name of the LPSZ user.</param> /// <param name="lpszDomain">The LPSZ domain.</param> /// <param name="lpszPassword

Categories : C#

Retroactively encrypting/hashing stored (plaintext) user credentials
If you are on a Windows network, I'd use Windows Auth, which uses Active Directory. That would allow your Systems Admin group/person to administer who has access to the application. Forms Auth is a good idea if Windows Auth won't work for you. If they won't give you the time to implement either of the auth frameworks, I'd definitely encrypt the passwords on the database. Write a Console app and encrypt the passwords using information found here: Encrypt/Decrypt string in .NET Then you'd need to modify your existing app to check encrypted passwords instead of plaintext ones.

Categories : Asp Net



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