Explicitly Declaring Dependencies In Web.Config - asp.net

I am trying to set up a website using ASP.Net (Framework 4.6.1).
I've setup several websites from scratch, but I've never run into this situation.
I'm getting the following error: This program is blocked by group policy. For more information, contact your system administrator
At this point, all I am trying to load is a static HTML menu page incorporated into the default.aspx file.
After more than an hour with GoDaddy, it was determined that the site is already setup with the maximum permissions. His suggestion was that I need to explicitly declare the dependencies for the application within the web.config file.
I haven't come across that requirement before. How do I go about doing that?
I am using the httpdocs folder for default.aspx file. I have all the bin folders located within that folder.
Any help will be greatly appreciated. Below is the web.config code and the error message.
Web.config file
Stack Trace

Related

Can't Access App_Code and App_Data on IIS

I just published my ASP.NET Website on IIS and have already configured it to be working, everything is running smoothly.
Except.. I can't accept the App_Data file where all my database information is stored. That might not be the only folder that i can't access but maybe possibly App_Code too? Where i place all my Data Access Object classes (CRUD).
I searched high and low on blogs, articles and stackoverflow but i still can't find the solution to accessing the folders.
I also read that by default certain file extensions are being blocked by IIS
These are some hopefully useful information..
It appears that App_Data and App_Code folders are empty..
Codes in Web.config file from Published Directory
Have some issues copying the codes..**
File Segments in IIS
ConnectionStrings in IIS
Error i'm getting..
Any help is appreciated..
Ok this is what you can try to isolate the issue.
Enable Failed Request tracing for the website for which you are seeing this failure.
This will help you determine where the error might be coming from.
Looking at the call-stack you provided, it seems that there is a different issue. I would suggest you to debug the web app on the server to understand what the problem is. Refer the instructions here: https://msdn.microsoft.com/en-in/library/mt621540.aspx

what is a root directory in IIS 6 and How do I make one of my subfolder in ASP.NET website the root directory?

I need to integrate a third party plugin in my asp.net website. To install the plugin, they have mentioned this sentence, "Create an application through your IIS control panel with root directory at -(some path from my website folder)?".
I am not much aware with IIS and rarely worked with it. Though I tried every possible way I could do in IIS, I am not able to work it out. After installation, there is a test page provided by plugin which I have to run to check but when I run it, it shows this error.
"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."
I searched this error too and found that it is because the two Web.Config file, one from the main project and another from plugin folder. The only way to work with this, is to make the plugin folder they specified as a root directory in IIS. Someone kindly tell me some easy steps to do this.
What I was doing is, in IIS6, I added New website with the main folder of my asp.net website, then I right click>add application and choose the given path, thought it would become root directory but it is not.
Help would be appreciated. Also note that, I have to put the plugin folder in my main website folder only. So, there are two web.config. I tried to rename one of them too, it solved the above error but gave another errors but I think main problem is of root directory. P.S they show me above error on web.config file of plugin folder on this sentence-
"Line 51:
< authentication mode="Windows" />"
Most of the times the root directory is C:\inetpub\wwwroot folder and "Default Web Site" on IIS Manager.
Open IIS Manager and under Sites there should be IIS websites and under it you will probably see Default website. You can see the root directory with Right click/Settings.
Copy your website files under this root directory.
And after copying folder to root folder you will see this folder under Default websites on IIS.
Right click your directory name on IIS and "Create Application", select correct .net framework.
It should be work. Good luck, if you need more help please give more details on your server IIS.

Where does IIS look for files

Can anyone explain, please, exactly how .net works. I create a web site in Visual Studio and publish it to a local server to a folder at
D:\WebSites\Project1
I create a web site in IIS and provide the address of the folder containing the files for the web site. When I publish the site, using 'fixed naming and single page assemblies', all the .aspx files go in the folder on the D drive and a dll for each page goes in the bin folder inside that folder.
I would assume that when someone wants to view a page in their browser, IIS retrieves the file(s) required from the folder specified, they get processed and turned into html and sent to the browser.
Recently when someone clicked a button on a page that calls a web service - a file not found error was reported. Apparently
C:\Temp\bx5tn2js.dll
could not be found. The thing is - why did IIS decide to look in C:\Temp for a file?
And, in the error message was a load of references to xml serialization. What is being serialized?
This file looks like the compile files that asp.net generates on compile.
This folder can be setup on web.config on compilation session with the
tempDirectory="C:\Temp"
If you do not have set this option asp.net is use a default folder that is usually inside the asp.net directory, inside the windows folder. But if you have set this, and this folder did not have the correct permissions, then asp.net fails to compile the project, and you can get a message like that.

Error: "The website declined to show this webpage" with AjaxControlToolkit 3.5

What I have?
I have a ASP.NET page deployed in layouts folder of 12 hive in SharePoint. This page makes use of Accordion control in AjaxControlToolkit.dll V3.5.40412.2.
I have placed the page code behind class assembly and AjaxControlToolkit.dll in Virtual Directory bin folder.
What I want?
I want to load this page when a link clicked from a web part for users of "Visitors" site group when the DLLs are placed in virtual directory bin folder.
What problem am I facing?
The page loads properly for administrator. But, for "Visitors", it shows "The website declined to show this webpage" error message.
In these scenarios the page works fine for "Visitors":
If I place both the assemblies in GAC
If I give Everyone read permission to AjaxControlToolkit.dll (in bin)
Am I missing something here?
Update: One strange thing I noticed was I removed everyone read access to the DLL and given one of the users in "Visitors" group read permission to the DLL. Then, I tried to login with that user and it works fine for him. But, now, it is working for all the users in "Visitors" group. I am surprised! When I removed the user read permission again same error repeated for all the users. How can it happen?
DLL's that are placed in the bin folder do not run uner Full Trust, you need to create a Code Access Security (CAS) policy file and deploy that to your sharepoint application. CAS policies are used by the .NET framework to assign execution rights etc. to (specific) dll's.
More info here.

Can someone please help with asp.net configuration error?

I have an issue that is driving me nuts and I have tried everything I can think of to solve it.
I started gettting the following error when I tried to launch asp.net configuration from within all visual studio pro 2008 projects and websites.
"Server Error in '/asp.netwebadminfiles' Application.
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration."
I am not sure what I have changed to start getting this error.
The problem is not confined to a particular project as I started a basic project from scratch and get the same issue. I get the error on all projects and websites.
I can still run the projects from the local server without any problem.
I have done what the error suggests to no avail. Is there a setting somewhere I have inadvertently changed to get this problem?
Have you looked at machine.config and \Windows\...\CONFIG\web.config and noted when they were last changed?
just to close this off.
There is a backup of the machine.config and web.config files in the /CONFIG directory with _default on the end. I renamed the existing files to _old and copied the new files to machine.config and web.config and all is now good and the asp.net config launches as expected.

Resources