I am trying to put a AD MembershipProvider to work but I am getting a very strange error:
"Parser Error Message: You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again."
Has anyone seen this? Obviously there are no other computers with clashing hostnames in my office (besides, I have tried renaming the pc to obscure names).
Here is my code:
login.aspx:
Please log in:
Welcome
default.aspx
Hello world!
web.config
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionUsername="domain\useraccount"
connectionPassword="password"
attributeMapUsername="sAMAccountName"
connectionStringName="ADService"></add>
</providers>
</membership>
<authentication mode="Forms">
<forms loginUrl="login.aspx"
protection="All"
timeout="30"
name="miBenefitsAdminToolCookie"
path="/"
requireSSL="false"
slidingExpiration="true"
defaultUrl="Default.aspx"
cookieless="UseCookies"
enableCrossAppRedirects="false"/>
</authentication>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
Am I doing anything wrong???
I was getting the same error in a totally different scenario (trying to access the sharepoint machine via a UNC path). The following registry change fixed my issue, hopefully it fixes yours too.
Apply the following registry change to the sharepoint server. To do so:
Start Registry Editor (Regedt32.exe).
Locate and click the following key in the registry:
HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters
On the Edit menu, click Add Value, and then add the following registry value:
Value name: DisableStrictNameChecking
Data type: REG_DWORD
Radix: Decimal
Value: 1
Quit Registry Editor.
Restart your computer.
I experienced the same cryptic error, but it wasn't because of the "membership" configuration. Instead, the ldap path in the connection string was at fault since I was pointed at our AD global catalogue (globalcatalogue.mydomain.local). Once I trimmed this down to just "mydomain.local" it worked fine. Perhaps it could be your LDAP path in your connection string?
Related
For my Project at work i want to install a provisioning Package, that contains a xml configuration for Kiosk Mode (Assigned Access).
I used the exact code from the xml reference page and inserted my Apps, as an account i used a local account that i created for testing.
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:rs5="http://schemas.microsoft.com/AssignedAccess/201810/config"
>
<Profiles>
<Profile Id="{786df454-09d0-492f-9ef0-c07731d1606f}">
<AllAppsList>
<AllowedApps>
<App DesktopAppPath="C:\Program Files\Google\Chrome\Application\chrome.exe"/>
</AllowedApps>
</AllAppsList>
<StartLayout>
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="Group1">
<start:Tile Size="4x4" Column="0" Row="0" DesktopAppPath="C:\Program Files\Google\Chrome\Application\chrome.exe" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="true"/>
<Taskbar/>
</Profile>
</Profiles>
<Configs>
<Config>
<Account>.\Kiosk-test</Account>
<DefaultProfile Id="{786df454-09d0-492f-9ef0-c07731d1606f}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>
When i try to install it, it either wont install at all with Error code 0x8007000b on one computer or on my private computer the installation will fail.
The Settings say that i has to Lock the user interface and make changes to the device.
then the EventLogs say that it failed due to follwing error: "Error during verification because the document does not contain exactly one root node. (0xC00CE223)" (translated with deepl, so might be a bit different in reality)
I could not find a matching solution on the internet.
I also tried using the configuration Wizard for single app Kiosk, and there the same error occured.
Does anyone of you know a solution to that or can tell me what the problem is at all?
I tried to change every part of the code, so that every aspect (App, User, e.g.) is tested seperately.
I moved my computer out the group policies, so that there are no GPOs that vreate an error.
The error messages didn't change at all
Thanks and best Regards!
In our web application we are using spring, hibernate & sql server 2016 as db. We are using jndi to connect to the database. To record all the queries executed by hibernate I am trying to implement the p6spy.
Here are the changes I have made.
Changed the resource information from
<Resource name="jdbc/eportalcore" auth="Container"
type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=eportal-core;"
username="eportaldbadmin"
password="P#ssw0rd"
maxTotal="100"
maxIdle="20"
minIdle="5"
maxWaitMillis="10000" />
to
<Resource name="jdbc/eportalcore" auth="Container"
type="javax.sql.DataSource"
driverClassName="com.p6spy.engine.spy.P6SpyDriver"
url="jdbc:p6spy:sqlserver://localhost:1433/eportal-core"
username="eportaldbadmin"
password="P#ssw0rd"
maxTotal="100"
maxIdle="20"
minIdle="5"
maxWaitMillis="10000" />
and added the spy.properties file under lib folder of tomcat directory. Also I have placed the p6spy-3.0.0.jar too inside the lib folder.
But after this my application is not getting connected to the DB. What mistake I am doing here? If I remove this changes then it is working fine.
Any suggestions?
I had the same question and here is what I did to make it work. Note my Database connection properties are in a property file (shouldn't be an issue) and that I use tomcat as an Application Server. You can also add P6Spy as a Maven dependency in your project.
Before :
db.properties
db.driver=net.sourceforge.jtds.jdbc.Driver
db.url=jdbc:jtds:sqlserver://${db.server}/${db.name};useNTLMv2=true;domain=XX
After :
Download(latest version when writing this response) the project. Put the p6spy-3.7.0.jar and spy.properties in the tomcat/lib folder. Change the spy.properties and application properties as noted under. Restart application and you should find a spy.log where your logs are printed normally.
db.properties
db.driver=com.p6spy.engine.spy.P6SpyDriver
db.url=jdbc:p6spy:jtds:sqlserver://${db.server}/${db.name};useNTLMv2=true;domain=XX
spy.properties
driverlist=net.sourceforge.jtds.jdbc.Driver
Currently working on PC-BC integration. I need to configure my studios with SQL Server database, For PC its working fine, but for BC I'm getting error. If anyone knows please help me to sort this out.
<database name="BillingCenterDatabase" dbtype="sqlserver" autoupgrade="true">
<dbcp-connection-pool jdbc-url="jdbc:sqlserver://localhost:1433;DatabaseName=BillingCenterDatabase;User=username;Password=pass#1121"/>
<upgrade defer-create-nonessential-indexes="false">
<versiontriggers dbmsperfinfothreshold="600" />
</upgrade>
</database>
my username is "username" and password is "pass#1121"
database name : BillingCenterDatabase
The error which I'm getting is
gw.pl.exception.GWLifecycleException: No appropriate database found in configuration: env = 'null'
try adding environment attribute in your database tag like shown below,
<database name="BillingCenterDatabase" dbtype="sqlserver" env="dev" autoupgrade="true">
<dbcp-connection-pool jdbc-url="jdbc:sqlserver://localhost:1433;DatabaseName=BillingCenterDatabase;User=username;Password=pass#1121"/>
<upgrade defer-create-nonessential-indexes="false">
<versiontriggers dbmsperfinfothreshold="600" />
</upgrade>
You should have to mention environment name in tomcat.conf in tomcat config file if you are deploying your application on tomcat.
JAVA_OPTS="-Dgw.server.mode=dev -Dgw.bc.env=st"
above line for st environment. you need to enter ut/st/st2 for different environment.
How do I get the Pivot Server Application to run on IIS 6? The handlers for the cxml don't seem to be registering properly, because I get a 404 for requests to .cxml files.
The closest solution I can see so far is on http://forums.silverlight.net/forums/p/192470/454278.aspx , but this doesn't seem to be the right way to do it. I see the handlers in the web.config under both system.webserver/handlers and system.web/httpHandlers.
In addition to the extension mappings proposed by gsimard on the pivot forum, reprinted here for convenience:
In IIS 6 --> properties of the web application --> Directory tab --> Configuration ...
I have added the following :
- Executable: C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll
Extension: .cxml
Limit to: GET
Script engine: checked
Verify that file exists: unchecked
- Executable: C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll
Extension: .dzc
Limit to: GET
Script engine: checked
Verify that file exists: unchecked
- Executable: C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll
Extension: .dzi
Limit to: GET
Script engine: checked
Verify that file exists: unchecked
At that point, the sample was able to run but no image was displayed. Then I thought that I could also add JPG.
- Executable: C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll
Extension: .jpg
Limit to: GET
Script engine: checked
Verify that file exists: unchecked
...the mime types section in <system.webserver> also needs to be uncommented:
<staticContent>
<mimeMap fileExtension=".cxml" mimeType="text/cxml" />
<mimeMap fileExtension=".dzc" mimeType="text/xml" />
<mimeMap fileExtension=".dzi" mimeType="text/xml" />
</staticContent>
Everything worked at this point.
I've recently moved up to Vista x64, and suddenly, my machine.config appSettings block isn't being read by any .NET assemblies.
Right after configSections, and before configProtectedData in C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config, I have:
<appSettings>
<add key="foo" value="blah"/>
</appSettings>
<system.runtime.remoting>
<customErrors mode="Off"/>
</system.runtime.remoting>
Had to save it by running Notepad++ as an administrator, because it's locked otherwise, probably for good reasons. Running the following code in SnippetCompiler or VS .NET 2008:
foreach(var s in ConfigurationManager.AppSettings.AllKeys)
{
Console.WriteLine(s);
}
AppSettingsReader asr = new AppSettingsReader();
Console.WriteLine(asr.GetValue("foo", typeof(string)));
writes out no keys and fails with the following exception:
---
The following error occurred while executing the snippet:
System.InvalidOperationException: The key 'foo' does not exist in the appSettings configuration section.
at System.Configuration.AppSettingsReader.GetValue(String key, Type type)
at MyClass.RunSnippet()
at MyClass.Main()
---
The app I write uses machine.config as a fallback for finding out which environment a user should be running in if it can't be found in the app.config, so I'd like to avoid having to rewrite my app to figure out something that should be working the same as it did in 2000 and XP.
Solved it with the following line of code:
ConfigurationManager.OpenMachineConfiguration().FilePath
which returned:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config\machine.config
instead of:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
Forgot I'm using 64 bits now. Adding the appSettings section in the proper config file solved the problem.