WP7 AdMob SDK doesn't Work - windows-phone-7

I always get an error when I start an app with an AdMob BannerAd. I just added the control to the toolbox and copy pasted in in the form.
Here is the relevant code:
<my:BannerAd HorizontalAlignment="Left" Margin="0,522,0,0" Name="bannerAd1" VerticalAlignment="Top" />
When I run the app I get this error:
System.NullReferenceException wurde nicht behandelt.
Message=NullReferenceException
StackTrace:
bei Google.AdMob.Ads.WindowsPhone7.WPF.DisplayAdBase.<>c__DisplayClass3c.<LoadDisplay>b__38()
bei System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
bei System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
bei System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
bei System.Delegate.DynamicInvokeOne(Object[] args)
bei System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
bei System.Delegate.DynamicInvoke(Object[] args)
bei System.Windows.Threading.DispatcherOperation.Invoke()
bei System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
bei System.Windows.Threading.Dispatcher.OnInvoke(Object context)
bei System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
bei System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
bei System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)

I'm using AldarIT SuperAds for three production Apps with AdMob as primary ad provider. No problems so far after 5 Months.

Im using http://wp7adrotator.codeplex.com/. Having no problems still on my app.
http://www.aldarit.com/superads.html is a good solution too. Used it before started using wp7adrotator. You might give it a try too.
Hope it helps.

Related

Server Error in '/' Application after build solution in Visual Studio

Im trying to sync my projects with Sitecore database but when I build the solution provided by Sitecore Learning (Clothing Company), my website is not loaded and an error appears. It was working fine before I try to build it.
`Server Error in '/' Application.
Could not load type 'Sitecore.HealthCheck.DependencyInjection.HealthChecksBuilder' from assembly 'Sitecore.Kernel, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null'.
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.TypeLoadException: Could not load type 'Sitecore.HealthCheck.DependencyInjection.HealthChecksBuilder' from assembly 'Sitecore.Kernel, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null'.
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:
[TypeLoadException: Could not load type 'Sitecore.HealthCheck.DependencyInjection.HealthChecksBuilder' from assembly 'Sitecore.Kernel, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null'.]
Sitecore.ContentSearch.SolrProvider.DependencyInjection.ContentSearchServicesConfigurator.AddContentSearchHealthChecks(IServiceCollection serviceCollection) +0
Sitecore.DependencyInjection.BaseServicesConfiguratorFactory.Configure(IServiceCollection serviceCollection) +171
Sitecore.DependencyInjection.BaseServicesConfiguratorFactory.Configure(IServiceCollection serviceCollection) +171
Sitecore.DependencyInjection.BaseServiceProviderBuilder.ConfigureServiceCollection() +142
Sitecore.DependencyInjection.ServiceLocator.ConfigureServiceProvider() +225
Sitecore.DependencyInjection.ServiceLocator.get_ServiceProvider() +513
Sitecore.DependencyInjection.SitecorePerRequestScopeModule..ctor() +13
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +142
System.Activator.CreateInstance(Type type, Boolean nonPublic) +107
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1476
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +186
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +80
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +234
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1153
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +139
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724`
Looking at error, it seems the Sitecore.Kernel.dll is getting replaced with different version in your website bin or your web.config file is getting replaced which might be having different assembly binding version info for Sitecore.kernel.dll.
I would suggest, check the Sitecore.kernel.dll version from your original website bin, in dotpeek.
Update Sitecore.kernel.dll of this version in your project solution via Nuget manager or update your DLL in your managed lib folder or DLL location folder.
Keep the assembly binding info in solution web.config as same as in the original web.config if you have.
If the DLL version is same both the place already, then load the Sitecore.kernel.dll in dotpeek, check for class Sitecore.HealthCheck.DependencyInjection.HealthChecksBuilder if there or not. If not, then some config file is having an entry for this class. Search word HealthChecksBuilder in App_config folder files, and comment the setting where you find and see if the site is up or not.
Then VS publish hope the issue gets resolved.

Exchange Server 2016: Server Error in '/ecp' Application

I am getting error in the ECP of Exchange Server 2016 while the OWA is working fine. The ECP login page opens but after login we get following error. This issue has been for around a week and we have not made any progress. Please assist if anyone has face similar error and resolved the issue.
Server Error in '/ecp' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%# Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Exchange.Management.ControlPanel.Global..cctor() +119
[TypeInitializationException: The type initializer for 'Microsoft.Exchange.Management.ControlPanel.Global' threw an exception.]
ASP.global_asax..ctor() +28
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +139
System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1431
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +184
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +79
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +178
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +341
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +523
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +688
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3770.0

Invalid Pointer error while debugging web application in visual studio 2015

I tried to run my web application using F5 key. I am getting invalid pointer error while debugging application.
Also getting below error in "ActivityLog.xml" file of visual studio.
CreateInstance failed for package [Microsoft.VisualStudio.TraceLogPackage.TraceLogPackage]Source: 'mscorlib' Description: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Diagnostics.HubExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.VisualStudio.TraceLogPackage.TraceLogPackage..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Diagnostics.HubExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Diagnostics.HubExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.VisualStudio.TraceLogPackage.TraceLogPackage..ctor() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I tried many solutions listed as below..
Clear temp files
Reset visual studio environment
Restart system
Repair Visual Studio 2015
But still I am not able to fix this issue. Please help me this fix this.

RavenDb, Cannot access file, the file is locked or in use

This is exception is totally make my life a pain right now.. Don't rightly know whats changed but the database is in the App_Data folder of a MVC3 site. The website is hosted in IIS 7.5 proper as the Default Web Site.
Any tips for resolution would be welcome.
EDIT.. The problem is probably more or less related to my controller code not cleaning up after an exception is being thrown, thus not calling dispose on the document session
Line 30: instance = new EmbeddableDocumentStore { ConnectionStringName = "RavenDB" };
Line 31: instance.Conventions.IdentityPartsSeparator = "-";
Line 32: instance.Initialize();
[EsentFileAccessDeniedException: Cannot access file, the file is locked or in use]
Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) in C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:2739
Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance) in C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:131
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator) in c:\Builds\RavenDB-Stable\Raven.Storage.Esent\TransactionalStorage.cs:207
[InvalidOperationException: Could not open transactional storage: C:\code\BE\Com.BuyEfficient\Com.BuyEfficient.Web\App_Data\ravendata\Data]
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator) in c:\Builds\RavenDB-Stable\Raven.Storage.Esent\TransactionalStorage.cs:220
Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration) in c:\Builds\RavenDB-Stable\Raven.Database\DocumentDatabase.cs:156
Raven.Client.Embedded.EmbeddableDocumentStore.InitializeInternal() in c:\Builds\RavenDB-Stable\Raven.Client.Embedded\EmbeddableDocumentStore.cs:143
Raven.Client.Document.DocumentStore.Initialize() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\DocumentStore.cs:483
Com.BuyEfficient.Web.Infrastructure.DataDocumentStore.Initialize() in C:\code\BE\Com.BuyEfficient\Com.BuyEfficient.Web\Infrastructure\DataDocumentStore.cs:32
Com.BuyEfficient.Web.App_Start.Services.PreStart() in C:\code\BE\Com.BuyEfficient\Com.BuyEfficient.Web\App_Start\Services.cs:25
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
WebActivator.BaseActivationMethodAttribute.InvokeMethod() +221
WebActivator.ActivationManager.RunActivationMethods() +491
WebActivator.ActivationManager.RunPreStartMethods() +28
WebActivator.ActivationManager.Run() +55
[InvalidOperationException: The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +423
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677
[HttpException (0x80004005): The pre-application start initialization method Run on type WebActivator.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) +9090044
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
Spaten, you need to make sure that you handle DocumentStore and DocumentSession lifecycle management properly. You should create the DocumentStore as a singleton on application start and you should open and dispose session on begin and end request. I suggest writing your own handlers for OnBeginRequest and OnEndRequest.
Please take a look at the official sample application, RaccoonBlog, to see how this works.

System.BadImageFormatException in VS2010 XAML-Designer

i use SQLite 1.0.79 (64 bit Setup over "sqlite-netFx40-setup-bundle-x64-2010-1.0.79.0.exe")
in my project.
Binding the SQLite over GAC.
But in the XAML-Designer throw follow Exception:
System.BadImageFormatException
Die Datei oder Assembly "System.Data.SQLite, Version=1.0.79.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.
bei System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.Assembly.Load(AssemblyName assemblyRef)
bei MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
bei Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
bei Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
bei MS.Internal.Metadata.ClrAssembly.GetRuntimeMetadata(Object reflectionMetadata)
bei Microsoft.Windows.Design.Metadata.AttributeTableContainer.d__c.MoveNext()
bei Microsoft.Windows.Design.Metadata.AttributeTableContainer.GetAttributes(Assembly assembly, Type attributeType, Func`2 reflectionMapper)
bei MS.Internal.Metadata.ClrAssembly.GetAttributes(ITypeMetadata attributeType)
bei MS.Internal.Design.Metadata.Xaml.XamlAssembly.get_XmlNamespaceCompatibilityMappings()
bei Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata sourceAssembly)
bei Microsoft.Windows.Design.Metadata.Xaml.XamlExtensions.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata source)
bei MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()
bei MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier)
bei MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context)
bei MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider, Boolean visitCodeModel)
bei MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors)
bei MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem()
bei Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem()
bei Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState()
bei MS.Internal.Host.PersistenceSubsystem.Load()
bei MS.Internal.Host.Designer.Load()
bei MS.Internal.Designer.VSDesigner.Load()
bei MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
bei MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)
bei MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
bei MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
bei MS.Internal.Host.Isolation.IsolatedDesigner.Load()
bei MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)
This Exception occurs on all Xaml-files.
But the program runs without error.
... EDIT ...
I have edited, because I'm not even allowed to respond
problem identified and resolved...
i had only installed the 64bit SQLite, but the VS2010 is a 32bit process.
Installing also the 32bit SQLite resolve the Problem
You only installed the 64bit SQLite, but the VS2010 is a 32bit process.
Installing also the 32bit SQLite will resolve the Problem.

Resources