.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Error activation LogWriter

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net
 

Hi,
in VS 2008 I'm trying to run a simple WinForm application that make a sum of 2 numbers.
I've referenced the .dll of Enterprise Library 5 in the project:

Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.EnterpriseLibrary.Logging.dll
Microsoft.Practices.ServiceLocation.dll
Microsoft.Practices.Unity.dll
Microsoft.Practices.Unity.Interception.dll

and I've write code like this:

private void btnSum_Click(object sender, EventArgs e)
{
     LogWriter DefaultWriter = EnterpriseLibraryContainer.Current.GetInstance<LogWriter>();
     if (DefaultWriter.IsLoggingEnabled())
     {
           DefaultWriter.Write("Begin Sum Method");
     }


and it compiles.

But when I run the program, I get this error:

{"Activation error occured while trying to get instance of type LogWriter, key \"\""}

Where I'm wrong?

Thanks in advance.

Luigi




View Complete Post


More Related Resource Links

Activation error occured while trying to get instance of type Database, key "DBName"

  

Im using Enterprise library 5.0
I have a scenario, where I have to access two different databases in my application.

Basically this application is a webservice,delployed on my local for testing purpose.
I'm trying to access this web method from diffent windows application, default connection works fine but the other database throw's exception.

Problem is only my defaultDatabase is works fine, if I change defaultDatabase="MYCON1" with "MYCON2" it works fine, if I try to access the other database which is not default, throws exception.

<dataConfiguration defaultDatabase="MYCON1" />
<connectionStrings>
<add name="MYCON1" connectionString="Data Source=server1;Initial Catalog=dbName1;User Id=Username1;Password=password1;"
providerName="System.Data.SqlClient

" />
<add name="MYCON2" connectionString="Data Source=Server2;Initial Catalog=dbName2;User Id=Username2;Password=password2;"
providerName="System.Data.SqlClient" />
</connectionStrings>


Database myDB=EnterpriseLibraryContainer.Current.GetInstance<Database>(); --> works fine for the default database (MYCON1)


Database myDB=EnterpriseLibraryCo

error: "The application-specific permission settings do not grant Local Activation "

  
Log Name:      System Source:        Microsoft-Windows-DistributedCOM Date:          9/14/2010 11:55:35 AM Event ID:      10016 Task Category: None Level:         Error Keywords:      Classic User:         XXXXX\spadm Computer:      XXXX.XXXXX.com Description: The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {61738644-F196-11D0-9953-00C04FD919C1}  and APPID {61738644-F196-11D0-9953-00C04FD919C1}  to the user XXXXX\spadm SID (S-1-5-21-6236335-3733969977-3477648964-5701) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool. Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">   <System>     <Provider Name="Microsoft-Windows-DistributedCOM" Guid="{1B562E86-B7AA-4131-BADC-B6F3A001407E}" EventSourceName="DCOM" />     <EventID Qualifiers="49152">10016</EventID>     <Version>0</Version>  &nb

Error on activation of feature

  
hello everybody i am creating list templates using features . i have created 3 files :- feature.xml , timesheet.xml,schema.xml . the feature is installed succesfully through stsadm but on activating feature error comes in stsadm as "Cannot complete this action.Please try again." I then tried to do it through GUI ->Sitefeatures->activate but error comes . then i tried to use force coomand as following :- stsadm -o activatefeature -name LitwareTimesheets -url "http://a-uhc:100/sites/projectmanagement" -force command prompt shows that operation completed successfully but nothing happens as i can't see feature in site features or list created in my main site . i havepasted files below:- feature.xml <?   xml version="1.0" encoding="utf-8" ?> <   Feature Id="85B2D079-AC3E-4260-9124-DBCAC2ABEAB0"     Title="Litware Timesheets"     Description="This feature provides support for Litware Timesheets"     Version="1.0.0.0"     Hidden="FALSE"     Scope="Site"     DefaultResourceFile="core"     xmlns="http://schemas.microsoft.com/sharepoint/"> <   ElementManifests> <   ElementManifest Location="Timesheets.xml"

Error Publishing Workflow - : Activation could not be completed because the InfoPath Forms Services

  
Recently our when trying to publish a new workflow we are getting the following error: Activation could not be completed because the InfoPath Forms Services support feature is not present. Another symptom is any existing custom workflows are not running. There are several older posts from SharePoint 2007 that indicate to disable and re-enable the SharePoint Server Enterprise Site features. I have tried that and I still get the error.  Looking through the ULS I see the following when I try and publish a workflow: 09/16/2010 15:04:29.48 w3wp.exe (0x2070) 0x0718 SharePoint Foundation General 8e2s Medium Unknown SPRequest error occurred. More information: 0x80070002 c700de1a-5756-4f45-915e-3b229e56f049 09/16/2010 15:04:29.48 w3wp.exe (0x2070) 0x0718 InfoPath Forms Services Conversion and Deployment ey0w Verbose VerifyListPresence: FTL not found on site:http://uchintranet due to expected FileNotFound exception:The system cannot find the file specified. (Exception from HRESULT: 0x80070002) c700de1a-5756-4f45-915e-3b229e56f049 09/16/2010 15:04:29.48 w3wp.exe (0x2070) 0x0718 InfoPath Forms Services Runtime 82mv Exception Activate NonAdminSolution failed with unhandled exception Microsoft.Office.InfoPath.Server.Util.InfoPathLocalizedException: Activation could not be completed because the InfoPath Forms Services support feature is not present.     at Mic

Sudden Error: Could not load type System.ServiceModel.Activation.HttpModule - Urgent Help Please

  
hi,

I have a windows 7 machine with IIS 7. I was hosting WCF services on IIS normally and i had a couple of services running.
Suddenly (i honestly did not do any configuration changes on my machine) all these services stopped working. When i try to browse the .svc file i get the following error:


"Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'"

Just in case this information is helpful, all these services are running on the basicHttpBinding.

Please help!

Microsoft Enterprise Library 5.0 - Logging Application Block Activation Error

  

Hi folks,

I've been writing a class where I wanted to write the errors off to the OS EventLog. I was pointed towards the Logging Application Block. I used LogWriter successfully in a web page and transfer the code to the class so that I could have the functionality there.

I keep getting an {"Activation error occured while trying to get instance of type LogWriter, key \"\""} Error when I reach this line of code:

private LogWriter writer = EnterpriseLibraryContainer.Current.GetInstance<LogWriter>();

I had something similar with the daab getinstance call but I added the unity assemblies to the code and this resolved this. I thought this was the issue with this problem.

Could anyone tell me what I'm doing wrong?

Thanks in advance folks.

app.config code:

---------------------------------------

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
&nbs

TimerJob feature activation error: access denied

  

Hi,

I created a timer job in VS 2010 using a Class Library Project Template and performed the rest of the required steps to deploy it. It is visible in my Site Collection Features but the problem is that when I try to activate it, an error is thrown. The error in log file says

The SPPersistedObject, MyTimerJob Name=Test Timer Job, could not be updated because the current user is not a Farm Administrator.	47f5015b-f5ba-43c6-8bc6-5a8208dbe403
Feature receiver assembly 'MyTimerJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc9139360518fedf', class 'MyTimerJob.TaskJobInstaller', method 'FeatureActivated' for feature '6805d4ac-8158-4555-8659-4a8815d0e0e1' threw an exception: System.Security.SecurityException: Access denied.   at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate()   at Microsoft.SharePoint.Administration.SPJobDefinition.Update()   at MyTimerJob.TaskJobInstaller.FeatureActivated(SPFeatureReceiverProperties properties)   at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) The Zone of the assembly that failed was: MyComputer	47f5015b-f5ba-43c6-8bc6-5a8208dbe403
Feature Activation: Threw an exception, attempting to roll back. Feature 'MyTimerJob' (ID: '6805d4ac-8158-4555-8659-4a8815d0e0e1'). Exception: System.Security.SecurityException: Access denied.   at Microsoft.SharePoint.Admi

TimerJob feature activation error: access denied

  

Hi,

I created a timer job in VS 2010 using a Class Library Project Template and performed the rest of the required steps to deploy it. It is visible in my Site Collection Features but the problem is that when I try to activate it, an error is thrown. The error in log file says

The SPPersistedObject, MyTimerJob Name=Test Timer Job, could not be updated because the current user is not a Farm Administrator.	47f5015b-f5ba-43c6-8bc6-5a8208dbe403
Feature receiver assembly 'MyTimerJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc9139360518fedf', class 'MyTimerJob.TaskJobInstaller', method 'FeatureActivated' for feature '6805d4ac-8158-4555-8659-4a8815d0e0e1' threw an exception: System.Security.SecurityException: Access denied.   at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate()   at Microsoft.SharePoint.Administration.SPJobDefinition.Update()   at MyTimerJob.TaskJobInstaller.FeatureActivated(SPFeatureReceiverProperties properties)   at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) The Zone of the assembly that failed was: MyComputer	47f5015b-f5ba-43c6-8bc6-5a8208dbe403
Feature Activation: Threw an exception, attempting to roll back. Feature 'MyTimerJob' (ID: '6805d4ac-8158-4555-8659-4a8815d0e0e1'). Exception: System.Security.SecurityException: Access denied.   at Microsoft.SharePoint.Admi

Custom Workflow deployed:Feature activation error:The file or folder name contains characters that a

  

Hi,

I am migrating custom workflow which was running in moss 2007 to SharePoint 2010.The approach was i created a new Sequential workflow project in VS 2010 under sharepoint . then i copied my Workflow files.Removed old refernces to 12 hive and updated to 14 root.

I could successfully buid this project.Then i have added Module project item called 'Forms' where i placed my Intiation form which is a infopath published form to nework location.

I could package and deploy the solution.But facing an error while Activating the feature.the error is The file or folder name contains characters that are not permitted.  Please use a different name.

 

Any help will be highly appritiated

 

Regards

Ram kiran

 


Feature Activation error:The file or folder name contains characters that are not permitted. Please

  

Hi,

I am migrating custom workflow which was running in moss 2007 to SharePoint 2010.The approach was i created a new Sequential workflow project in VS 2010 under sharepoint . then i copied my Workflow files.Removed old refernces to 12 hive and updated to 14 root.

I could successfully buid this project.Then i have added Module project item called 'Forms' where i placed my Intiation form which is a infopath published form to nework location.

I could package and deploy the solution.But facing an error while Activating the feature.

 

Any help will be highly appritiated

 

Regards

Ram kiran


Enterprise Library 5.0 Activation error occured

  

Hi,

       I am using Enterprise Library 5.0,when am run the console application ,i got this error " Activation error occured while trying to get instance of type Database,key 'xxx' ".

 

Thanks

Deivendran


using EnterpriseLibrary.Data gives error as "Activation error occured while trying to get instance o

  

Hi,

I am using the "Microsoft.Practices.EnterpriseLibrary.Data" version "5.0.414.0". I am using VS 2010.

I have added connectionstring entry in the web.config, and I am able to access the database using SQL Server 2008 R2.

I have added the below line in my code to use the database:

 

using System.Data;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data.Common;

public class A1
{
public DataSet GetTableData()
{
Database db = null;
db = DatabaseFactory.CreateDatabase("Connection String Name");
}
}

However, I am getting an error as:

"Activation error occured while trying to get instance of type Database, key". It breaks in CreateDatabase line.

How to fix this?

Thank you


Activation error occured while trying to get instance of type Database, key "DBName"

  

Im using Enterprise library 5.0
I have a scenario, where I have to access two different databases in my application.

Basically this application is a webservice,delployed on my local for testing purpose.
I'm trying to access this web method from diffent windows application, default connection works fine but the other database throw's exception.

Problem is only my defaultDatabase is works fine, if I change defaultDatabase="MYCON1" with "MYCON2" it works fine, if I try to access the other database which is not default, throws exception.

<dataConfiguration defaultDatabase="MYCON1" />
<connectionStrings>
<add name="MYCON1" connectionString="Data Source=server1;Initial Catalog=dbName1;User Id=Username1;Password=password1;"
providerName="System.Data.SqlClient

" />
<add name="MYCON2" connectionString="Data Source=Server2;Initial Catalog=dbName2;User Id=Username2;Password=password2;"
providerName="System.Data.SqlClient" />
</connectionStrings>


Database myDB=EnterpriseLibraryContainer.Current.GetInstance<Database>(); --> works fine for the default database (MYCON1)


Database myDB=EnterpriseLibraryContainer.Current.GetInstance<Database>("MYCON2"); --> Error message, see below


Activation e

IsapiModule Error 500 Issue

  

I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:

ISAPI_START

CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"

 

Handling 404 page not found with Error page

  

Hi,

      How do i handle 404 page not found?


Inserting personal error message in ValidationSummary

  

Hi,

I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance


Sys.Net.WebServiceFailedException: The server method '' failed with the following error:

  

 Hello...

Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

[WebMethod]
        public static string aaa(int i)
        {
            Thread.Sleep(1000);
            return i.ToString();
        }

        [WebMethod]
        public static string aaa1(int i)
        {
            Thread.Sleep(1000);
            return i.ToString();
        }

 

 

<div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        </asp:ScriptManager>
        <span id="displayspan"></span>
        <br />
        <input type="button" value=
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend