Can somebody please help me?
After receiving an email from Google yesterday that advised a couple of links in my site (www.bigint.biz) were broken, I repaired them. Then I made a change to the sitemap.
Afterwards, when accessing the site I received the message: Server Error in '/' Application, Runtime Error, This tag should then have its "mode" attribute set to "Off".
So, I put the site exactly back how it was before the changes to the sitemap; but, I received
an internal server error 500 error message.
Then, I removed the whole site from the host provider and uploaded it again with the original version that worked fine with no joy.
Since, I have set the customErrors tag "mode" attribute to "Off" to get a more detailed error message - below:
Server Error in '/' Application.
Unspecified error [ 5,sqlcese40.dll ]
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlServerCe.SqlCeException: Unspecified error [ 5,sqlcese40.dll ]
Source Error: Line 2: #{ Line 3: Line 4: WebSecurity.InitializeDatabaseConnection("PhotoGallery", "UserProfile", "UserId", "Email", true);
Source File: \web-123win\winpackage22\XXX.COM\web\content_AppStart.cshtml Line: 4
Stack Trace:
[SqlCeException (0x80004005): Unspecified error [ 5,sqlcese40.dll ]]
System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent) +2182
System.Data.SqlServerCe.SqlCeConnection.Open() +47
WebMatrix.Data.Database.EnsureConnectionOpen() +44
WebMatrix.Data.<QueryInternal>d__0.MoveNext() +66
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +164
WebMatrix.Data.Database.QuerySingle(String commandText, Object[] args) +103
WebMatrix.WebData.DatabaseWrapper.QuerySingle(String commandText, Object[] parameters) +14
WebMatrix.WebData.SimpleMembershipProvider.CheckTableExists(IDatabase db, String tableName) +57
WebMatrix.WebData.SimpleMembershipProvider.CreateTablesIfNeeded() +49
WebMatrix.WebData.WebSecurity.InitializeMembershipProvider(SimpleMembershipProvider simpleMembership, DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean createTables) +73
WebMatrix.WebData.WebSecurity.InitializeProviders(DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +51
WebMatrix.WebData.WebSecurity.InitializeDatabaseConnection(String connectionStringName, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +51
ASP._Page__appstart_cshtml.Execute() in \\web-123win\winpackage22\bigint.biz\www.bigint.biz\web\content\_AppStart.cshtml:4
System.Web.WebPages.ApplicationStartPage.<ExecuteInternal>b__0() +65
System.Web.WebPages.ApplicationStartPage.<GetSafeExecuteStartPageThunk>b__3(Action action) +7
System.Web.WebPages.ApplicationStartPage.ExecuteInternal() +78
System.Web.WebPages.ApplicationStartPage.ExecuteStartPageInternal(HttpApplication application, Action`1 monitorFile, IVirtualPathFactory virtualPathFactory, IEnumerable`1 supportedExtensions) +184
System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application, Action`1 monitorFile, IVirtualPathFactory virtualPathFactory, IEnumerable`1 supportedExtensions) +30
[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application, Action`1 monitorFile, IVirtualPathFactory virtualPathFactory, IEnumerable`1 supportedExtensions) +96
System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application) +170
System.Web.WebPages.WebPageHttpModule.StartApplication(HttpApplication application, Action`1 executeStartPage, EventHandler applicationStart) +126
System.Web.WebPages.WebPageHttpModule.StartApplication(HttpApplication application) +71
System.Web.WebPages.WebPageHttpModule.Init(HttpApplication application) +127
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9874568
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
I noticed that when I was uploading the site again using FileZilla Client that 4 files failed to copy to the host; however, the same files are in the host bin directory as they did not originally delete for some reason - access rights I think. The files are:
web/content/bin/X86/sqlceer40ENN.dll
web/content/bin/X86/sqlceqp40.dll
web/content/bin/X86/sqlcese40.dll
web/content/bin/X86/sqlceme40.dll
Is this just coincidence, as the error message references one of these files?
Any help would be really appreciated.
Thank you.
EDIT - I have found a little more info here but I am struggling to understand how it can help me: http://www.blakepell.com/Blog/?p=227
I have got the site back up and running for the minute by removing: WebSecurity.InitializeDatabaseConnection("PhotoGallery", "UserProfile", "UserId", "Email", true);
But the issue still exists
I picked this problem up again today all this time later and found the solution with research. This is how I got there.
Replacing the dll files as recommended above didn't work before.
So, I started again by switching off my custom errors page which enabled me to get to get to the error code again.
I Googled the error and research pointed to a connection string issue or a folder permissions issue.
It's a good job I checked the permissions again because I previously set the folder permissions in the App_Data folder where the .sdf database was to enable read and write access using FileZilla but nothing actually changed. It seemed to work because changes appeared to cascade down through all the sub directories, but it didn't work.
The permissions were not actually changed using the FTP method although it looked like it had happened. I only found out because another post that I saw today suggested changing permissions through the control panel so I went back there to check them only to see a padlock by the folders.
So, I unlocked the folder permissions on App_Data correctly this time in the control panel file manager. I then un-commented the web security code below in the _AppStart page again and tried the site online and it worked.
Finally, I set custom errors back to on.
The moral is use the control panel and not FTP client to change folder permissions on hosted folders. I hope this helps someone else.
Related
I have hosted an asp.net webapi project in IIS.The api calls to this project throws an error as mentioned below. The same webapi call works fine when the project is hosted into IIS of another webserver.
[RoutePrefix("api/datacc")]
public class DataAccessController : ApiController
{
[HttpGet]
[Route("")]
public int HeartBeat()
{
return 1;
}
}
Error
*[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.RuntimeModule.GetTypes() +9
System.Reflection.Assembly.GetTypes() +61
FluentNHibernate.AssemblyTypeSource.GetTypes() in c:\work\coding\fluentNhibernate\src\FluentNHibernate\AssemblyTypeSource.cs:27
FluentNHibernate.PersistenceModel.AddMappingsFromSource(ITypeSource source) in c:\work\coding\fluentNhibernate\src\FluentNHibernate\PersistenceModel.cs:80
FluentNHibernate.Cfg.FluentMappingsContainer.Apply(PersistenceModel model) in c:\work\coding\fluentNhibernate\src\FluentNHibernate\Cfg\FluentMappingsContainer.cs:122
FluentNHibernate.Cfg.MappingConfiguration.Apply(Configuration cfg) in c:\work\coding\fluentNhibernate\src\FluentNHibernate\Cfg\MappingConfiguration.cs:80
FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration() in c:\work\coding\fluentNhibernate\src\FluentNHibernate\Cfg\FluentConfiguration.cs:249
[FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
]
ProjectName2.Data.UnitOfWork..ctor(String databaseConnectionString) in C:\agent\_work\5\s\.....\ProjectName\UnitOfWork.cs:169
ProjectName.WebApiConfig.Register(HttpConfiguration config) in C:\agent\_work\5\s\.....\ProjectName\App_Start\WebApiConfig.cs:66
System.Web.Http.GlobalConfiguration.Configure(Action`1 configurationCallback) +27
ProjectName.WebApiApplication.Application_Start() in C:\agent\_work\5\s\....\ProjectName\Global.asax.cs:18
[HttpException (0x80004005): An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +10093921
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +218
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10075124
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254*
I'd bet there is a problem connecting to the database from the new IIS server you are having problems with. This is coming from NHibernate, so it is an issue with the database; however, if it works from one server then it's probably configured correctly. Verify that you can access the database directly from the new IIS server.
I keep getting this error, usually after changing the web.config on a running ASP.NET MVC azure web service app. It will run fine the first time but after it recompiles after changing the web.config this is usually appearing. I think it happens sometimes by just starting and stopping the web app. The only way I can make it go away is by publishing the app again from visual studio to azure.
Method not found: 'Microsoft.Practices.Unity.IUnityContainer MyProject.Core.ContainerManager.GetConfiguredContainer()'.
The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation
Source File: D:\MyProject-master\src\MyProject.Web\App_Start\UnityMvcActivator.cs Line: 73
StackTrace
MissingMethodException: Method not found:
'Microsoft.Practices.Unity.IUnityContainer
MyProject.Core.ContainerManager.GetConfiguredContainer()'.]
MyProject.Web.App_Start.UnityWebActivator.Start() in D:\MyProject-master\src\MyProject.Web\App_Start\UnityMvcActivator.cs:73
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +87
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +73
WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +350
WebActivatorEx.ActivationManager.Run() +78
[InvalidOperationException: The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +615
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +141
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
System.Web.Compilation.BuildManager.ExecutePreAppStart() +157
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +549
[HttpException (0x80004005): The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10075124
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
This question seems very close to my issue but I haven't gotten this solution to work, there are two projects in my solution that use the RegisterTypes method:
interface and cannot be constructed on Unity config
These questions were related but not exactly this issue:
https://stackoverflow.com/questions/21078380/webactivatorex-dll-unity-bootstrap-is-firing-on-a-different-project
ActivationManager Exception during build process?
Unity Bootstrapper from NuGet is throwing error on App_Start
EDIT: If I merge the application into single assemblies during deployment the issue doesn't seem to happen anymore.
Install-Package Microsoft.AspNet.WebHelpers
For me, this turned out to be a problem where I was trying to inject something null into something that required a value -- didn't actually have anything to do with the error. For instance, I had a configuration setting that was missing, and it was trying to inject that missing setting somewhere. Once I realized which injection was going awry and fixed it, the error went away.
I am attempting a simple example project to get to know how to configure a Windows Azure Cloud service to use Co-located caching.
I am using VS2010 and have followed this example but when I get to the end of the section on co-located caching, I cannot run my project locally. It worked fine when
I am getting the following exceptions: (I hope it's readable..)
Error in '/' Application.
The requested name is valid, but no data of the requested type was found
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SocketException (0x2afc): The requested name is valid, but no data of the requested type was found]
Microsoft.ApplicationServer.Caching.AsyncResultNoResult.EndInvoke() +202
Microsoft.ApplicationServer.Caching.AsyncResult`1.EndInvoke() +40
Microsoft.ApplicationServer.Caching.SocketConnectionFactory.EndConnect(IAsyncResult asyncResult) +75
Microsoft.ApplicationServer.Caching.TcpClientChannelFactory.TcpConnectionCallback(IAsyncResult result) +182
[DataCacheException: ErrorCode:SubStatus:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.). Additional Information : The client was trying to communicate with the server: net.tcp://SessionStateDemo:24233.]
Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ErrStatus errStatus, Guid trackingId, Exception responseException, Byte[][] payload, EndpointID destination) +767
Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, EndpointID destination) +149
Microsoft.ApplicationServer.Caching.DataCacheFactory.EstablishConnection(IEnumerable1 servers, RequestBody request, Func3 sendMessageDelegate, DataCacheReadyRetryPolicy retryPolicy) +1313
Microsoft.ApplicationServer.Caching.<>c__DisplayClass5.b__2(RequestBody req) +198
Microsoft.ApplicationServer.Caching.SocketClientProtocol.SendReceive(IVelocityRequestPacket request, Func2 delegate, EndpointID& destination) +121
Microsoft.ApplicationServer.Caching.SocketClientProtocol.Initialize(IEnumerable1 servers) +1225
Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName, CreateNewCacheDelegate cacheCreationDelegate, DataCacheInitializationViaCopyDelegate initializeDelegate) +1104
Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName) +131
Microsoft.Web.DistributedCache.DataCacheFactoryWrapper.CreateDataCacheFromFactory(DataCacheFactory factory, String cacheName) +63
Microsoft.Web.DistributedCache.CacheHelpers.RunCacheCreationHooks(CacheConnectingEventArgs fetchingEventArgs, IDataCacheFactory dataCacheFactory, Object sender, EventHandler1 fetchingHandler, EventHandler1 fetchedHandler) +306
Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider.CreateInternalProvider(IHttpRuntime httpRuntime, SessionInitializationData initData, IDataCacheFactory dataCacheFactory, EventHandler1 cacheFetching, EventHandler1 cacheFetched) +399
Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider.GetInternalProvider() +315
Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider.CreateNewStoreData(HttpContext context, Int32 timeout) +59
System.Web.SessionState.SessionStateModule.InitStateStoreItem(Boolean addToContext) +160
System.Web.SessionState.SessionStateModule.CompleteAcquireState() +340
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1269
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +12698078
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
Can anyone tell me what is happening here? How can I fix this?
Is there something missing in that tutorial that I need to do?
EDIT: I am using VS2010 Professional, with Windows Azure SDK 2.1. Widnows Azure Cache package is v2.1.0.
Relevant web.config sections:
<system.web>
...
<!-- Windows Azure Caching session state provider -->
<sessionState mode="Custom" customProvider="AFCacheSessionStateProvider">
<providers>
<add name="AFCacheSessionStateProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" dataCacheClientName="default" applicationName="AFCacheSessionState"/>
</providers>
</sessionState>
...
<sytem.web>
<dataCacheClients>
<dataCacheClient name="default">
<!--To use the in-role flavor of Windows Azure Caching, set identifier to be the cache cluster role name -->
<autoDiscover isEnabled="true" identifier="SessionStateDemo" />
</dataCacheClient>
</dataCacheClients>
Based on this thread it looks like the Windows Azure Cloud Service must be a startup project to work properly. Otherwise the Windows Azure Runtime won't initialize what causes the SocketExceptions.
I have a web role that works perfectly on my Development PC (VS2013 & Window 8.1 Enterprise x64), but fails when I publish it to Azure with the following exception:
[InvalidProgramException: Common Language Runtime detected an invalid program.]
Castle.Core.ComponentModel.get_Dependencies() +0
Castle.Core.ComponentModel.AddConstructor(ConstructorCandidate constructor) +264
Castle.MicroKernel.ModelBuilder.Inspectors.ConstructorDependenciesModelInspector.ProcessModel(IKernel kernel, ComponentModel model) +535
Castle.MicroKernel.ModelBuilder.<>c__DisplayClass6.<BuildModel>b__4(IContributeComponentModelConstruction c) +137
System.Collections.Generic.List`1.ForEach(Action`1 action) +95
Castle.MicroKernel.ModelBuilder.DefaultComponentModelBuilder.BuildModel(IComponentModelDescriptor[] customContributors) +404
Castle.MicroKernel.Registration.ComponentRegistration`1.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel) +283
Castle.MicroKernel.DefaultKernel.Register(IRegistration[] registrations) +198
Castle.Facilities.TypedFactory.TypedFactoryFacility.InitFacility() +745
Castle.Facilities.TypedFactory.TypedFactoryFacility.Init() +78
Castle.MicroKernel.Facilities.AbstractFacility.Castle.MicroKernel.IFacility.Init(IKernel kernel, IConfiguration facilityConfig) +165
Castle.MicroKernel.DefaultKernel.AddFacility(String key, IFacility facility) +507
Castle.MicroKernel.DefaultKernel.AddFacility(IFacility facility) +213
Castle.MicroKernel.DefaultKernel.AddFacility() +167
Castle.Windsor.WindsorContainer.AddFacility() +138
PingTree.Journey.WebRole.IoCConfig.RegisterComponents() in d:\Users\Ben\OneDrive\Source\PingTree\JourneyWebRole\PingTree.Journey.WebRole\App_Start\IoCConfig.cs:19
PingTree.Journey.WebRole.MvcApplication.Application_Start() in d:\Users\Ben\OneDrive\Source\PingTree\JourneyWebRole\PingTree.Journey.WebRole\Global.asax.cs:15
[HttpException (0x80004005): Common Language Runtime detected an invalid program.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +475
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +214
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +203
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +313
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +250
[HttpException (0x80004005): Common Language Runtime detected an invalid program.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +452
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +1017
The code for the RegisterComponents method is
public static void RegisterComponents()
{
var assemblyPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "bin");
var windsorContainer = new WindsorContainer();
windsorContainer.AddFacility<TypedFactoryFacility>();
windsorContainer.Install(FromAssembly.InDirectory(new AssemblyFilter(assemblyPath)));
windsorContainer.Register(Classes.FromThisAssembly().BasedOn<IController>().LifestyleTransient());
ControllerBuilder.Current.SetControllerFactory(new WindsorControllerFactory(windsorContainer));
}
Its failing on the windsorContainer.AddFacility method call.
I've tried the usual things, used NuGet to remove Castle.Windsor from the project, deleted the local copy and reinstalled Windsor. Another answer here suggested deleting the local temporary ASP.Net files, I've tried that as well. But every time I publish I get the same problem.
Update 1
I've been able to reproduce the problem with the boiler plate azure web role template and the following code
protected void Application_Start()
{
var windsorContainer = new WindsorContainer();
windsorContainer.AddFacility<TypedFactoryFacility>();
}
Is anybody using Castle Windsor 3.3 on azure without problems?
A more specific answer would be that it seems to be a problem with IntelliTrace.
The deployments that throw the Invalid program exception, had IntelliTrace enabled. By disabling IntelliTrace and redeploying the solution, and the role initialised and started correctly.
I'm still not sure what caused the InvalidProgramException.
BUT, I was able to resolve my issue by deleting the Azure deployment and creating a brand new Visual Studio solution, and publishing that.
We did have same problem and we also use windsor castle 3.3. We too remove intelliTrace from azure publish profile and it magicaly solved this issue.
I just created an account on my client's website (which I build for him). I have tested this website extensively and could not find any problems - 2 years ago. I've since tested it to make sure it's all running smoothly every month since the website was released.
I just created a new account on his website just now, and I get this error:
Server Error in '/' Application.
Mailbox unavailable. The server response was: <me#myemail.com> No such user here
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: <me#myemail.com> No such user here
Source Error:
Line 62: HttpUtility.UrlEncode(token));
Line 63:
Line 64: WebMail.Send(
Line 65: email,
Line 66: "Please confirm your Account.",
Source File: d:\HostingSpaces\website\website.com.au\wwwroot\Protected\Account\Register.cshtml Line: 64
Stack Trace:
[SmtpFailedRecipientException: Mailbox unavailable. The server response was: <me#myemail.com> No such user here]
System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) +1229659
System.Net.Mail.SmtpClient.Send(MailMessage message) +1772
System.Web.Helpers.WebMail.Send(String to, String subject, String body, String from, String cc, IEnumerable`1 filesToAttach, Boolean isBodyHtml, IEnumerable`1 additionalHeaders, String bcc, String contentEncoding, String headerEncoding, String priority, String replyTo) +686
ASP._Page_Protected_Account_Register_cshtml.Execute() in d:\HostingSpaces\website\website.com.au\wwwroot\Protected\Account\Register.cshtml:64
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +208
System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68
System.Web.WebPages.WebPage.ExecutePageHierarchy() +123
System.Web.WebPages.StartPage.RunPage() +19
System.Web.WebPages.StartPage.ExecutePageHierarchy() +67
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +121
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
What the??? The email address listed down there is the email address I used to create the account. After getting this error, I then logged into that email account online - and it's there - with all my mails. So the user does exist. So then why does WebPages framework thing that this user does not exist when trying to send an email confirmation to it?
The email variable you see up there in the code - it's value is listed in the exception itself.
It may happen that for a fraction of second the mailbox was unavailable for some reasons. try again creating the account and it should be fine.