Saturday, March 31, 2012
SubSonic web.config problem
I'm using SubSonic tool, and my website works fine on my machine. When I try to host my website on my hosting account, I get web.config error:
-- ERROR --
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: 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.
...
Line 25: <SubSonicService defaultProvider="MYWebsiteDB">
-- ERROR --
- Here's the full web.config file.
Thanks!
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
<section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false"/>
</configSections>
<connectionStrings>
<add name="MyWebsiteConnection" connectionString="Data Source=localhost\SQL2005;Database=MyWebsiteDB;User ID=myUser;Password=myPass;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<SubSonicService defaultProvider="MyWebsiteSQL">
<providers>
<add name="MyWebsiteSQL" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="MyWebsiteConnection" generatedNamespace="MyWebsite.DataAccess" fixPluralClassName="true"/>
</providers>
</SubSonicService>
<appSettings>
<add key="SupplierFilePath" value="~/admin/SuppliersFiles/"/>
<add key="SupplierFilePathTemp" value="~/admin/SuppliersFiles/Temp/"/>
</appSettings>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<compilation debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
<authentication mode="Forms">
</authentication>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>
</system.webServer>
<system.net>
<mailSettings>
<smtp>
<network host="localhost" port="25" userName="" password=""/>
</smtp>
</mailSettings>
</system.net>
</configuration>You have a virtual directory under a virtual directory with a web.config in it. Am I right?
Wednesday, March 28, 2012
Sudden VS2003 Error
my own machine. I had to reboot. When I came back, VS started acting
flakey. It would not reload my project claiming that it could not connect
to the url on my machine (something like http://localhost/myApplication).
"A connection with the server could not be established"
I tried this:
1) backed up all files
2) deleted the project folder from wwwroot
3) created a new web application in visual studio using the same name
4) copied all the source code files (no project or solution) into that
folder and added them to the new project
Worked fine at first and built just fine, but when I exited VS and came back
it would no longer load either.
Caveat 1: When I rebooted I changed my network password, but I don't expect
this should matter in any way.
Caveat 2: I am running McAfee Anti-Virus (required by the site whose machine
this actually is).
Tried to google the error for a solution, but nothing seems to fix it.
Any takers?Hi
There are known problems with McAfee and VS.NET.
If you are forced to use McAfee make sure the "buffer overload" option
is off.
Good luck.
Regards,
Daniel Roth
MCSD.NET
Dan,
I'll disable it, but can you tell me what effect it had on you, or how you
figured out that it was the problem?
<dan.c.roth@.gmail.com> wrote
> There are known problems with McAfee and VS.NET.
> If you are forced to use McAfee make sure the "buffer overload" option
> is off.
Sudden VS2003 Error
my own machine. I had to reboot. When I came back, VS started acting
flakey. It would not reload my project claiming that it could not connect
to the url on my machine (something like http://localhost/myApplication).
"A connection with the server could not be established"
I tried this:
1) backed up all files
2) deleted the project folder from wwwroot
3) created a new web application in visual studio using the same name
4) copied all the source code files (no project or solution) into that
folder and added them to the new project
Worked fine at first and built just fine, but when I exited VS and came back
it would no longer load either.
Caveat 1: When I rebooted I changed my network password, but I don't expect
this should matter in any way.
Caveat 2: I am running McAfee Anti-Virus (required by the site whose machine
this actually is).
Tried to google the error for a solution, but nothing seems to fix it.
Any takers?Hi
There are known problems with McAfee and VS.NET.
If you are forced to use McAfee make sure the "buffer overload" option
is off.
Good luck.
Regards,
Daniel Roth
MCSD.NET
Dan,
I'll disable it, but can you tell me what effect it had on you, or how you
figured out that it was the problem?
<dan.c.roth@.gmail.com> wrote
> There are known problems with McAfee and VS.NET.
> If you are forced to use McAfee make sure the "buffer overload" option
> is off.
Suddenly can't load assembly
development machine to
a Windows 2003 server, and the web site worked fine.
Today I made a few changes on my machine, and tried to repeat the
process,
but I get an error message:
Could not load file or assembly 'BaseRS' or one of its dependencies.
Access is denied
BaseRS.dll is in the bin folder, as it was previously.
Any ideas about what causes this message?What were the "few changes" you made ?
Anything to do with file permissions or the ASP.NET account ?
Did you enable impersonation and now a different account needs permissions ?
Juan T. Llibre
ASP.NET.FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
<jhcorey@.yahoo.com> wrote in message news:1133453674.384226.289410@.z14g2000cwz.googlegroups
.com...
>I am using VS2005, and yesterday I copied a web site from my
> development machine to
> a Windows 2003 server, and the web site worked fine.
> Today I made a few changes on my machine, and tried to repeat the
> process,
> but I get an error message:
> Could not load file or assembly 'BaseRS' or one of its dependencies.
> Access is denied
> BaseRS.dll is in the bin folder, as it was previously.
> Any ideas about what causes this message?
>
Did you try IISReset before doing the deployment.
If not, you may like to do that. Also, clear all your Temporary Asp.net
files from the folder C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files
before you deploy the application.
If that doesn't help you can try Filemon utility from www.sysinternals.com
and serch for access denied after you reproduce the error and save the log
file from the Filemon utility.
HTH
--
Cheers,
Rahul Soni
-->The secret to creativity is knowing how to hide your sources<--
"jhcorey@.yahoo.com" wrote:
> I am using VS2005, and yesterday I copied a web site from my
> development machine to
> a Windows 2003 server, and the web site worked fine.
> Today I made a few changes on my machine, and tried to repeat the
> process,
> but I get an error message:
> Could not load file or assembly 'BaseRS' or one of its dependencies.
> Access is denied
> BaseRS.dll is in the bin folder, as it was previously.
> Any ideas about what causes this message?
>
The app does use impersonation, and that may have been a change in the
web.config.
(Although it uses anonymous access, and yes there was a reason for this
that made sense at one point).
I can experiment without impersonation and see if that makes a
difference. What would I do if it does?
I'm not familiar with any new deployment procedures, so I figure I
better take a look in help.
But I assumed that copying the folders would work for deployment, as it
did in ASP.NET 1.
Anyway, I'll try Rahul's suggestions as well, thanks.
re:
> I can experiment without impersonation and see if that
> makes a difference. What would I do if it does?
Run this aspx page :
identity.aspx :
--
<%@. Page Language="VB" %>
<script runat="server">
Sub Page_Load(obj as object, e as eventargs)
Dim user as string = Environment.Username
lblUser.Text = user
End Sub
</script>
<html>
<body>
<asp:Label id="lblUser" runat="server"/></asp:Label>
</body>
</html>
--
That will tell you which account needs permission to the directory
where the BaseRS assembly is located ( the /bin dir, right ? ).
Juan T. Llibre
ASP.NET.FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
<jhcorey@.yahoo.com> wrote in message news:1133455339.559879.253270@.g44g2000cwa.googlegroups
.com...
> The app does use impersonation, and that may have been a change in the
> web.config.
> (Although it uses anonymous access, and yes there was a reason for this
> that made sense at one point).
> I can experiment without impersonation and see if that makes a
> difference. What would I do if it does?
> I'm not familiar with any new deployment procedures, so I figure I
> better take a look in help.
> But I assumed that copying the folders would work for deployment, as it
> did in ASP.NET 1.
> Anyway, I'll try Rahul's suggestions as well, thanks.
>
Juan,
Impersonation was indeed the issue. The impersonation user id is from
a different domain.
For some reason this did not cause a problem on my development machine.
I'm not sure if I should address this within the folder system or
within IIS6.
I tried changing the security on the folder (it already had 'Everyone'
with full control)
to give explicit access to this userid, but it didn't help.
Thanks,
Jim
Finally got this working (I think)
After quite a bit more playing around with security for impersonated
user,
I googled some more and saw that I had to grant permissions (full
control) on
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
and so I'm running...
Jim
Suddenly Noticed ASP.net as user account on my computer
Why is there an ASP.NET account on my machine?
my problem is similar except it is asking for a password for this account and is now requiring a password for my own account before it will launch windows. I have never set up a password so I don't know how to get into my computer to uninstall the ASP.Net account. Even bringing it up in Safe Mode it is still asking for a password.
Does anyone have a solution for this?