MicrosoftEdge / enterprise-mode-site-list-portal

Other
52 stars 24 forks source link

Problem with EM Site List Portal #13

Open WarrenMed opened 5 years ago

WarrenMed commented 5 years ago

Not able to register the employee on Enterprise Mode Site List portal and getting "An error occurred while getting your Active Directory data" on the web form. Have a 2-server and 2-domain architecture but unsure if that matters on this error. Traces show IIS is returning a 500 error.

HTTP/1.1 500 Internal Server Error Cache-Control: private Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/8.5 X-AspNet-Version: 4.0.30319 Persistent-Auth: true X-Powered-By: ASP.NET Date: Mon, 11 Mar 2019 19:29:41 GMT Content-Length: 10279

jierong commented 5 years ago

When you use F12 to inspect the Network trace, is error message "Keyword not supported: 'server'."?

If yes, then you can open the Web.config file in your web site folder, and update your connection string with following format:

metadata=res://*/EMIEDataModel.csdl|res://*/EMIEDataModel.ssdl|res://*/EMIEDataModel.msl;provider=System.Data.SqlClient;provider connection string="data source=<<Your DB Server Name>>;initial catalog=<<Your DB Name>>;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"

Please check if this resolves your issue.

At the same time, I've created a pull request to request to update the original doc.

mfehrman commented 4 years ago

I'm having the same issue as WarrenMed. When I use f12 to inspect the Network trace, I get "angular.js:12265 POST https://localhost/User/GetADUserFromAllDomain?userName=%22johan%22 500 (Internal Server Error)"

When I drill down into that, I get "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"

I attached 2 screenshots of my errors. Enterprise Mode Site List Portal.docx

Here is some additional background: I am trialing the Enterprise Mode Site List Portal in a lab on a Win10 home PC with a Hyper-V. The lab has 2 servers and a workstation. Server #1 (DC01) has AD,DHCP,DNS roles. Server #2 (CM01) has SCCM and the Enterprise Mode Site List Portal roles. The workstation is a test Windows 10 machine. They are all connected via an internal network NAT in Hyper-V, and they also all have a 2nd NIC to connect to the outside internet. I'm not a developer, but I used the free version of MS Visual Studio 2019 to build the .sln file. Could I be getting the AD error because I didn't build the app from a workstation on the domain? I did it on my home PC. All the checks pass for AD connections/queries. I don't have an Exchange server, but I do have the 'mail' attribute filled out as their test email addresses for my test users. I feel like this "will just work" in my test environment at work, but I wanted to build a case to use this, and I wanted to install in a lab first so I can understand it better.

Anyone have any ideas or things to try?

MarkSPowell commented 4 years ago

You should be able to build the app on a non-domain machine, as long as it's running on a domain joined machine.

I'd check that Johan has a valid Email and Display Name in Active Directory, based on your screenshot. My guess is that Display Name may be blank.

mfehrman commented 4 years ago

That did the trick! Now I have it fully up and running in my lab so I can give it a proper evaluation. So far, I am super impressed. Thanks Mark for your help. You saved me hours.