Server Error in '/' Application in sharepoint 2010 - sharepoint-2010

I cannot open sharepoint central administrative site after configuration due to "Server Error in '/' Application" error. I have located CustomErrors and turn it off in web.config file located in /layout/template
Regards.

You need to turn off the customErrors ="Off" in the C:\Inetpub\wwwroot\wss[yourportnumber]. You can find the web.config file in it.
Also please elaborate the web.config file changes you have made so that we can see and provide you some guidelines according to that.

Related

Net 6 showing 500.19 error reading the wrong web.config

I deployed a brand new site on IIS. It is in .Net 6. I am getting a 500.19 error that it cannot read the configuration file due to insufficient permissions.
\\?\D\Sites\SiteDirectory\wwwroot\web.config
The problem is this web.config file that it is pointing to is not the one for my website. It is looking for a web.config in the wwwroot directory for some reason. As a matter of fact there is no web.config that even exists at that location.
The correct web.config file exists in
D:\Sites\SiteDirectory\wwwroot\SiteName\web.config
Why is IIS looking at wwwroot? How can I fix this behavior? My other .Net Framework 4.7 sites work fine without this web.config at the root directory.
I solved it by installing this component:
Windows Hosting Bundle
"https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-6.0.6-windows-hosting-bundle-installer"

WebDeploy with VS2015 ignores web.config transform

I opened an existing project in VS2015, made some small changes and published the MVC application to my webserver with an existing WebDeploy publishing profile. This broke the application because the web.config file on the server was overwritten with the original one for my developers machine. I have checked the settings in the Publish-wizard but the configuration was like always before. I could fix the application by manually changing the web.config on production but am afraid now to publish again.
Has anything changed in the WebDeploy publishing method with web.config transformation?
I solved it. In my case the publishing profile was renamed to "servername (production)" and the configuration setting for the transformation was only web.servername.config. After changing the name of the publishing profile to the exact same name as the config setting it worked.

How to set a relative service reference in Visual Studio?

We have a WCF client and we got the wsdl information in a file. How can I enter a relative URL (to the Visual Studio project) instead of an absolute URL? I tried many forms with no luck, the error message is Invalid URI.
Rationale: Not all developers have checked out the project in the same directory. So it is cumbersome to update the service reference.
What we do in similar scenario is having url pointing to localhost.
Therefore each developer has the service configured in their IIS with same url, something like http:\localhost... so config is the same for all.
If this is not an option you might use Slow Cheetah to transfom web.configs (we use it for configs pointing to DEV, QA, Beta, etc.)

WCF Service Deployment in IIS Page cannot be displayed and how does the SVC file work?

Arghhh! I'm getting so frustrated trying to get my head around this WCF service.
So I created a WCF service. It works fine in my laptop where I launch it from Visual Studio 2010. Now I have to deploy it on a Windows Server 2003 machine. So I created a virtual directory on that server's IIS. Next I copied the WCF Service DLL file in the virtual directory. I also created an SVC file which had the following entry:
<%# ServiceHost Language="C#" Service="AMWCF.Service1" %>
Ok first of all, I'm so confused here. Where does this line tell the Server where the DLL file is? It just says "AMWCF.Service"! not file location!
So when I try to launch my webpage, it gives an error "THE PAGE CANNOT BE DISPLAYED". I've tried everything which I can find on the net including:
Reinstalling the ServiceModelReg
Restrarting IIS
Allowing ASP.NET in IIS
Sorry for showing my frustration here. I really really reallllly appreciate any help. Thanks guys. You guys are the best
If you have a class library with your WCF service inside, you need to copy the service DLL into the .\bin folder one level down from your virtual directory. That's where the WCF runtime looks for its service classes.
Also see these resources:
MSDN docs: How to: Host a WCF Service in IIS
endpoint.tv Screencast - Hosting WCF Services in IIS
The WCF Developer Center on MSDN has a "Beginnger's Guide" (available right from the landing page) which has tons of those excellent 5-10 minute screencasts explaining all things WCF to you - highly recommended!
Page cannot be displayed error is coming from IIS.
Add a simple html file and see if IIS can serve that file
Add a simple aspx file and see if IIS can serve that file
Now add .svc file as one of the documents in document list in IIS
Place dll in a bin folder under the virtual directory's physical path
Once you get the asp.net run time errors, it is easy find the answers
for them
If this stuff is new to you, you should use the visual studio deployment features, try right click your web project and click deploy, I think it'll solve your issues, you can even deploy using ftp through this wizard.

SharePoint 2010 WebPart Configuration File

Where is it best practice to set up the configuration such as connection strings or web service URL's in SharePoint 2010's Web Parts?
Web parts do not contain a web.config or an app.config and for good reason. So i wanted to know what everyone else does.
Would it be a good idea to create another assembly file along with your project?
Bill.
WebPart refers the configuration file web.config of the Web Site where it is deployed to. So we all use web.config for storing all the configuration.
Below Links will help you to get the value from the Web.Config
To Read Connection String.
To Read application Settings.