Log error "Could not load file or assembly 'BarcodeConversion' or one of its dependencies. Access is denied. This code work fine in server 2008 but get this error in server 2012

This code work fine in server 2008, but get this error in server 2012.  Do yo have any idea?

Need some more info as to where this is installed and how.
First thing to try would be to uninstall the solution and reinstall.
Check the GAC for your assembly as well as web.config.
If you don't see it in one of those places, something went wrong with the install and you'll need to start over.
Brandon James SharePoint Developer/Administrator

Similar Messages

  • Help with Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    This was all working yesterday, but this morning, I cannot run in the dev fabric, or even setting the website project as a startup project directly, I get the following error:
    Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    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.BadImageFormatException: Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    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.
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'msshrtmi' could not be loaded.
    === Pre-bind state information ===
    LOG: User = Andrew-VAIO\Andrew
    LOG: DisplayName = msshrtmi
    (Partial)
    WRN: Partial binding information was supplied for an assembly:
    WRN: Assembly Name: msshrtmi | Domain ID: 3
    WRN: A partial bind occurs when only part of the assembly display name is provided.
    WRN: This might result in the binder loading an incorrect assembly.
    WRN: It is recommended to provide a fully specified textual identity for the assembly,
    WRN: that consists of the simple name, version, culture, and public key token.
    WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
    LOG: Appbase = file:///C:/Users/Andrew/Desktop/Beko2011Azure/Website/
    LOG: Initial PrivatePath = C:\Users\Andrew\Desktop\Beko2011Azure\Website\bin
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\Users\Andrew\Desktop\Beko2011Azure\Website\web.config
    LOG: Using host configuration file:
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/cb955b02/eef106e2/msshrtmi.DLL.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/cb955b02/eef106e2/msshrtmi/msshrtmi.DLL.
    LOG: Attempting download of new URL file:///C:/Users/Andrew/Desktop/Beko2011Azure/Website/bin/msshrtmi.DLL.
    ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
    Stack Trace:
    [BadImageFormatException: Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
    System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
    System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
    System.Reflection.Assembly.Load(String assemblyString) +28
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
    [ConfigurationErrorsException: Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
    System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
    System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
    System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677
    [HttpException (0x80004005): Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9079228
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
    System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258
    Note that the dev machine is x64 Win7.
    I have not tried deploying this to staging since the issue started as I'm a bit nervous of touching the staging/live environment until this is solved.
    Removing the PlatformTarget element from the project file has no effect
    Removing the msshrtmi.dll file from the bin directory of the website project ends up with 
    'Could not load file or assembly 'Microsoft.WindowsFabric.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified'
    I have used Git to revert to the last working build to no effect (But I don't have the obj/bin folders in GIT), but it has atleast reset the project files etc.
    If I return msshrtmi.dll to the bin folder and switch the model and website projects to x64 there is no change
    If I switch both to x86 then I get an error Could not load file or assembly 'BekoModel2011' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    which is the model project - presumably because to run on my x64 machine I need the 64bit version?
    I really need to be able to debug and then publish some changes ASAP.
    Andrew

    Hi,
    Is it true that you're using IIS to host the application? Could you check whether the process is x64 or x86 one via task manager or config in IIS manager?
    http://blogs.msdn.com/b/rakkimk/archive/2007/11/03/iis7-running-32-bit-and-64-bit-asp-net-versions-at-the-same-time-on-different-worker-processes.aspx
    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Could not load file or assembly 'Ajaxcontroltoolkit' or one of its dependencies. Access denied

    Hi all,
    I have searched a lot in google, but could not find the same scenario i am facing.
    I have a asp.net 3.5 web application, which use ajax toolkits. Also, I am impersonating the logged active directory users to connect sql server with their own windows credential. Everything fine, but sometimes, I am getting the error "Could not load file
    or assembly 'Ajaxcontroltoolkit' or one of its dependencies. Access denied". If I republish the site, the error will go. I dont know which cause to this error?
    Any solution would be highly appreciated.

    Hi Ghouse,
    Sorry for my weak explanation. 
    Let me bit more clear. I publish the web app into a server. It works very fine. But, after few days, or even before, it show the subject error. Then it will keep on coming the same error. If I publish again, the web starts working again. After few days,
    the error will come again. I dont know what is the root cause.
    I see a message "This file came from another computer and might be blocked to help protect this computer" on the properties box of the ajax dll. I clicked on ublock. After that the access denied issue didnt appear. But, not sure this is the solution, I also
    have give full right to asp.net temperory file folder. 

  • Could not load file or assembly 'log4net' or one of its dependencies. An at

    Hi guys,
    Yesterday I downloaded the CR release for VS2010. Before this I was using the Beta (and later Beta2) version. Both worked fine. I first uninstalled the beta version, next I installed the release version. No problems with installing. But now I'm trying to use CR. I get the error:
    "Could not load file or assembly 'log4net' or one of its dependencies. An attempt was made to load a program with an incorrect format.".
    I noticed that it has something to do with the runtime enviroment. If I set the project's platform target to x86, it works fine. Turning it back to 'any CPU' or x64, it results in that error. (I'm using w7 x64).
    I did install the the x64 runtime (CRRuntime_64bit_13_0.msi, also asked at the end of the installation).
    Any ideas how to solve this?
    Why is CR using log4net anyway?
    Best,
    Danny

    Hi Ludek,
    Thanks for you replies. Let's answer them:
    -Is this a local install, or are you using some sort of a remote connection?
      It's my local development machine.
    -Are you getting the error at build time or at runtime?
      Both: VS2010 doesn't give a compiler error, but only a warning. At runtime in completly crashes.
    - Look in the GAC. Do you see Log4Net.dll? There should be two - one for 32 bit and one for 64 bit OS (same version though).
      Both are there.
    Further I noticed the following.
    - If I set the target platform to Any CPU (and thus x64), when building, log4net.dll is copied to the bin folder. If the target platform is set to x32, log4net.dll is not copied. If a take a look at the last modified time of the dll and compare this to the dll in the GAC, the 64-bit dll is copied. So this looks right.
    - If I selected the included reference in VS2010, it says that the path of the reference is the following: ...\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.ReportSource.dll. So it looks like the 32-bit version of CR is used.  When I go the folder Crystal Reports for ...\.NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86, I can find here a folder "dotnet", containing all the references included in the project. Taking a look into the "win64_x64" folder, I can't find the "dotnet" folder. I did install the 64-bit runtime version.
    Hope this information helps

  • Could not load file or assembly '9LensesLogger' or one of its dependencies. Access is denied.

    Could not load file or assembly '9LensesLogger' or one of its dependencies. Access is denied.
    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.IO.FileLoadException: Could not load file or assembly '9LensesLogger' or one of its dependencies. Access is denied.
    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.
    Assembly Load Trace: The following information can be helpful to determine why the assembly '9LensesLogger' could not be loaded.
    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].
    Stack Trace:
    [FileLoadException: Could not load file or assembly '9LensesLogger' or one of its dependencies. Access is denied.]
    System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +210
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +242
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +17
    System.Reflection.Assembly.Load(String assemblyString) +35
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +130
    [ConfigurationErrorsException: Could not load file or assembly '9LensesLogger' or one of its dependencies. Access is denied.]
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +1220
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +435
    System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +132
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334
    System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +148
    System.Web.Compilation.BuildManager.ExecutePreAppStart() +171
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1037
    [HttpException (0x80004005): Could not load file or assembly '9LensesLogger' or one of its dependencies. Access is denied.]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +646
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +778
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18449

    Hi vaibhavdaji.86,
    >>An unhandled exception was generated during the execution of the current web request.
    Base on the description, I think your project is a web project.
    The forum supports .net framework setup. I suggest you post your issue to ASP.NET forum below.
    http://forums.asp.net/
    I will move the thread to off-topic forum. Thanks for your understanding.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • System.IO.FileNotFoundException: Could not load file or assembly 'App_GlobalResources' or one of its dependencies.

     Hello,
    I have a project that have resources in App_GlobalResources folder in which .resx files' custom tool are set to GlobalResourceProxyGenerator.
    So that I can use my resouce files like 
    Resources.myResource.myString 
    This works without any problems.
    However when I add UnitTests to my project and run those tests, whenever main application uses the resources it throws following exception:
     System.IO.FileNotFoundException: Could not load file or assembly 'App_GlobalResources' or one of its dependencies.
    I have been searching for a possible solution for a week but no chances. I have a co-worker here in the same company who has the same problem in different project.
    Is this a known bug or do we do something wrong?
    Thanks in advance.
    Yusuf DemiragYusuf

     
    Hello Yusuf,
    Thank you for your post!  I would suggest posting your question in one of the MS Forums, 
    Home › ASP.NET Forums
    located here:  http://forums.asp.net/
    Have a great day!

  • Could not load file or assembly itextsharp or one of its dependencies.

    Hi
    I want to generate pdf files in Sharepoint 2010 and to that end have added the iTextSharp dll to my project’s ‘References’.
    However when I try to use the library I’m getting the below error in the browser:

    Adding it to the GAC using GAC util adds it to the file system, it does NOT make it part of the WSP.
    You do not HAVE to add the dll to the wsp package, instead you can use Gacutil and install on each server. I build deployment packages (batch file to add dlls, install solution, activate features) to simplify the process
    If you want to add the dll to the wsp via the advanced tab, don't do it!!! Not to the wsp for your solution anyway. The reason is, when you remove the wsp, SharePoint REMOVES THE DLLS IN THE ADVANCED TAB FROM THE GAC, EVEN IF THOSE DLLS ARE USED IN A DIFFERENT
    WSP.
    So you have project1.wsp and project2.wsp and both have that same dll in the advanced tab. You add both to the same server, then remove project1.wsp. SharePoint removes the dll and now you've broken project2. The dll might still be in the GAC, but be locked
    and unavailable.
    The best practice is to actually create a separate wsp for your dll, with a name and intention that it will never be removed, even if you remove your project.
    eg. Project1.wsp and Project1Dlls.wsp, Project2.wsp and Project2Dlls.wsp and you NEVER remove the dll projects, which are the ones with dlls added via Advanced tab in package. This way, if you have to remove one of the projects then the other will still
    function.

  • Could not load file or assembly log4net or one of it dependencies

    I hit an error could not load file or assembly log4net or one of it dependencies when I run my web application on 2008 server 64 bit.
    I develop the web app using VS 2010 under Window 7 32 bit.  The crystal report using 32 bit as well.  I compile the system and  target to x64 platform and try to deploy it under Window server 2008 64 bit.  I have install the CR 2010 re-distribute 64 bit in the server.  May I know what the causes?  Is it I'm not able to build 64 bit application using VS 2010 run under 32 bit platform?
    Pleae help.

    See if KB 1543854 helps (use the search box in the top right corner of this page). Also search these forums for log4net and use the search box for the term also.
    - Ludek

  • Error: Could not load file or assembly 'Microsoft.Activities, Version=1.0.0.0

    Hi,
    I am using VS 2012 to create custom sequential workflows (2010 model). The workflows created in VS 2010 are working fine, but the workflow created in VS 2012 is throwing the error.
    When the workflow is run, I am getting the below error:
    Error:
    Could not load file or assembly 'Microsoft.Activities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    Stack Trace: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean
    forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean
    throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at System.Workflow.Activities.Rules.SimpleRunTimeTypeProvider.get_ReferencedAssemblies() at System.Workflow.Activities.Rules.RuleValidation.DetermineExtensionMethods()
    at System.Workflow.Activities.Rules.RuleValidation.get_ExtensionMethods() at System.Workflow.Activities.Rules.RuleValidation.GetNamedMethods(List`1 targetTypes, String methodName, BindingFlags methodBindingFlags) at System.Workflow.Activities.Rules.RuleValidation.ResolveMethod(Type
    targetType, String methodName, BindingFlags methodBindingFlags, List`1 argumentExprs, ValidationError& error) at System.Workflow.Activities.Rules.MethodInvokeExpression.Validate(CodeExpression expression, RuleValidation validation, Boolean isWritten) at
    System.Workflow.Activities.Rules.RuleExpressionWalker.Validate(RuleValidation validation, CodeExpression expression, Boolean isWritten) at System.Workflow.Activities.Rules.RuleValidation.ValidateConditionExpression(CodeExpression expression) at System.Workflow.Activities.Rules.RuleExpressionCondition.Validate(RuleValidation
    validation) at System.Workflow.Activities.Rules.RuleConditionReference.Evaluate(Activity activity, IServiceProvider provider) at System.Workflow.Activities.IfElseActivity.Execute(ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T
    activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.FaultAndCancellationHandlingFilter.Execute(Activity activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime
    workflowCoreRuntime) at System.Workflow.Runtime.Scheduler.Run()
    How to fix this?
    Thanks

    Hi,
    The machine in which the workflow was created is different from the machine it is deployed.
    Which dll should be available? Is the dll not part of SharePoint 2013?
    Is this part of workflow Manager?
    Thanks

  • Deploy Web Site Error:Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies

    I have created a ASP.NET web Site (not Web application), using Visual Studio 2012 Ultimate and "SQL Server Compact 4.0 Local Database" in my C# Code.
    I am able to successfully compile & publish the website to another IIS Web Server, with Operating System Windows Server 2008 R2 Standard. I can even test, successfully, this website on the machine I developed it in.
    I am publishing the website, from within Visual Studio, to a Network web server running IIS.  To Publish I am using Build-> "Publish Web Site".  In the Publish Profile, I am using Web Deploy Method. Even though I am using, successfully,
    "SQL Server Compact 4.0 Local Database" in my website, the "settings" (in Publish Profile) does not detect any Databases in the project. Which may not be a problem.
    When I try to bring up the web site on the IIS Web Server machine I get the following error..    
    Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies .
    As my project is a Web Site, not Web Site Application, I do not have a references node in the Solution Explorer. I think the System.Data.SqlServerCe.dll, which is type GAC in my project, is not getting published to the webserver, which is causing this Error.
    Can I copy this .dll over manually ? If yes, where to put on the ISS Web Server ? I do not see any bin folder.
    Any help to resolve this error will be appreciated.
    diana4

    Hello.. I went ahead and created web application project and have gone past that error. But I have a new error now
    System.Data.SqlServerCe.SqlCeException: Unable to load the native components of
    SQL Server Compact corresponding to the ADO.NET provider of version 8876.
    Install the correct version of SQL Server Compact. Refer to KB article 974247
    for more details.
    Compiling and Publishing (Deployment) are both successful 
    In my project, when adding reference to SQL Server Compact Edition , there are 2 possible locations to reference the DDL from:
    C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Private
    C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Desktop.
    I have tried both. I get the same error as shown above.
    Interestingly, in My WebConfig, I do not see any reference to System.Data.SqlServerCe.
    Yet, the Website works when I click on Ctrl+F5 
    diana4

  • Error could not load file or assembly netpont.licencing error'

    Hi,
    iam new to netpoint SDK, i have created table and i have two fields like accounid,accountame i try insert through netpoint.api.dll
    pls herewith below i have attached follwing code. Please guide me
    how to insert a sample data in sample database.
      using System;
    using System.Data;
    using System.Configuration;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using netpoint.classes;
    using netpoint.api;
    using netpoint.api.account;
    using netpoint.api.common;
    using netpoint.api.prospecting;
    public partial class _Default : netpoint.classes.NPBasePage
        protected void Page_Load(object sender, EventArgs e)
        protected void Button1_Click(object sender, EventArgs e)
            System.Data.Odbc.OdbcConnection cn;
            System.Data.Odbc.OdbcCommand com;
            string strsql;
            NPBasePage bp = (NPBasePage)Page;
            cn = new System.Data.Odbc.OdbcConnection("Driver={SQL Server};Server=btsserverdc02;Database=library;Uid=sa;Pwd=sa2000");
            strsql = "insert into Users values('" + txtsample1.Text + "','" + txtsample2.Text + "' )";
             cn.Open();
            com = new System.Data.Odbc.OdbcCommand(strsql, cn);
            com.ExecuteNonQuery();
            cn.Close();

    Here's a sample page to display the logged in users' email address:
    <%@ Import Namespace="netpoint.classes" %>
    <%@ Import Namespace="netpoint.api" %>
    <%@ Import Namespace="netpoint.api.account" %>
    <%@ Page language="c#" MasterPageFile="~/masters/common.master"  Inherits="netpoint.classes.NPBasePage" %>
    < script runat="server"> //REMOVE SPACE BETWEEN < AND SCRIPT
    private NPBasePage bp;
    private NPUser u;
    public void Page_Load(object sender, System.EventArgs e){
    if (!base.IsPostBack)
         this.bp = (NPBasePage) this.Page;
            this.u = new NPUser(this.bp.UserID);
         if (this.bp.UserID != "")
            user.Text = u.Email;
         else
         user.Text = "Not logged in";
    </script>
    <asp:Content ContentPlaceHolderID="mainslot" runat="server" ID="main">
    User Email: <asp:Label ID="user" runat="server" Text="Label" Width="97px"></asp:Label> </div>
    </asp:Content>

  • Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral

    Hi,
    I have a web site developed with vs 2010 (32-bit) and crystal report 13 (for sv 2010). It's working well i when crystal report installed in gac. I need to this app on a server WITHOUT crystal report installed. so I copied all required crystal assemblies into the bin folder and publish it. I always get following error message
    Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    I tried a lot of solutions in this forum, but none of them resolved my issue.
    Please help!!
    thanks,
    Max

    Stick with x86 or x64, not Any CPU.
    Don't include log4net manually
    Look at these Kbases:
    [1543854  - Error: Could not load file or assembly log4net|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533343333333833353334%7D.do]
    [1550854  - "Could not load file or assembly 'log4net' or one of its dependencies" Error when building Visual Studio 2010 solution utilizing the Crystal Reports .NET Runtime|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353330333833353334%7D.do]
    [1544693  - Error BC30560: 'CrystalReportViewer' is ambiguous in the namespace 'CrystalDecisions.Web'|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533343334333633393333%7D.do]
    [1548993  - Server Error in '/' Application when running .NET Web Application using Crystal Reports for Visual Studio 2010|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533343338333933393333%7D.do]
    - Ludek

  • Could not load file or assembly "Oracle.DataAccess" or one of its dependencies

    Hi All,
      I am trying to run this web application. I keep getting this error
    "Could not load file or assembly "Oracle.DataAccess" or one of its dependencies. An attempt was made to load a program with an incorrect format."
    Exception details: System.BadImageFormatException. "Could not load file or assembly "Oracle.DataAccess" or one of its dependencies. An attempt was made to load a program with an incorrect format."
    Below are the things that I already tried.
    1) replaced all the oracle dll's with 32 bit oracle dll i.e 2.112.3.0
    I have 32 bit client installed on 64 bit machine. The operating system is windows 7.
    2) compile each individual project individually. Deleted all the oracle dependent files dll and then added the 2.112.3.0 dll's individually and then compiled each project
    3) Register the 32 bit dll on GAC using this statement
    gacutil /i %ORA_HOME4%\odp.net\bin\4\Oracle.DataAccess.dll
    gacutil /i %ORA_HOME4%\asp.net\bin\4\oracle.web.dll
    for the above two statements, I copied the gacutil.exe from c:\Program Files(x86)\Microsoft sdk\windows\v7.0A\Bin\NETFX4.0 Tools\X64
    to C:\ drive and then
    I executed the above two statement:
    gacutil /i %ORA_HOME4%\odp.net\bin\4\Oracle.DataAccess.dll
    gacutil /i %ORA_HOME4%\asp.net\bin\4\oracle.web.dll
    when I excecuted the above two statements, I didn't get any message, I exceuted them in Dos windows under administrator privilege.
    4) I also deleted all the Temporary ASP.net files from this location
    c:\windows\Microsoft.Net\V4.0.30319\temporary ASP.net files
    I also changed the web application build Platform target to X86, Originally, it was at "ANy CPU". out of frustration, I also tried changing the platform target to X64 and then I got the error message saying
    " Cold not load file or assemble . webapp" or one of its dependencies. An attempt was made to load a program with an incorrect format.
    I don't have IIS installed on my computer, I am running this application in visual studio 2010 so I think it will be using the inbuild IIS that comes with visual studio.
    I spend lot of hours resolving this issue, but still getting the same error again and again.
    any help or hint will be highly appreciated.

    You have a 32/64bit mismatch going on.
    Possibly the bit where you said you replaced the .dll's with 32 bit Oracle dll's is the source of the problem.
    You needs that Oracle.DataAccess managed wrapper to be able to locate the underlying oci client dlls of the appropriate version.
    The ODP .net install guide is very very good and thorough and straight forward to read and use and understand and explains how to achieve this.
    Also what is the target compile type of your VS project? That'll have to be 32 bit, or any as well.

  • Convert-WindowsImage.ps1 Could not load file or assembly 'System.Linq,..' error

    I tried the following:
    .\Convert-WindowsImage.ps1
    -SourcePath C:\Backups\All\Files\Windows8-ReleasePreview-64bit-English.iso -VHDFormat VHD -SizeBytes 52GB -VHDPath C:\AllSharedC\VPC\Win8.vhd
    and got the following error in the log.  .Net 4.0 full and WMF 3.0 RC are all installed.
    Log
    Windows PowerShell transcript start
    Start time: 20120601112809
    Username  : Sys\User
    Machine   : Sys (Microsoft Windows NT 6.1.7601 Service Pack 1)
    ERROR  : Could not load file or assembly 'System.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    INFO   : Log folder is C:\Users\Byron\AppData\Local\Temp\Convert-WindowsImage\942fccac-662a-4b2a-bfa9-6831892cad5c
    INFO   : Done.
    Windows PowerShell transcript end
    End time: 20120601112809
    How can I solve this?

    Running on Win7 Ultimate with sp1. I'm sure I got all the prerequites installed.
    System Requirements
    Convert-WindowsImage can only be run on Windows 8 Consumer Preview, Windows 8 Release Preview, Windows Server 8 Beta, and Windows Server 2012 Release Candidate
    operating systems.
    Sorry man.  As per above

  • Could not load file or assembly AjaxToolkit error in SharePoint 2013 Visual Webpart

    I wanted to use ajax controls in visual webpart for sharepoint 2013 so i followed steps.
    1-I cut this snippet (see below) from <head></head> Section and paste in <body></body> Section for my master page since it's a requirement for SharePoint 2013 ajax functionality.
    Snippet:
    <!--MS:<SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server">-->
    <!--MS:<WebPartPages:SPWebPartManager runat="server">-->
    <!--ME:</WebPartPages:SPWebPartManager>-->
    <!--ME:</SharePoint:AjaxDelta>-->
    2-downloaded a latest ajax tool kit and then added ajax toolkit dll from the toolkit library in my solution's bin-->debug folder
    now add ajax entries in web.config in these sections
    in <SafeControls>
          <SafeControl Assembly="ajaxcontroltoolkit, Version=4.1.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL" Namespace="AjaxControlToolkit" TypeName="*" />
    in <assemblies>
    <add assembly="AjaxControlToolkit, Version=4.1.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" />
    in <controls>
    <add tagPrefix="ajax" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=4.1.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" />
    finally registered ajax in visual web part as 
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxtoolkit" %>
    added following calender control
    <asp:TextBox MaxLength="10" ID="txtToDate" runat="server" CssClass="FormTextBoxSmall"></asp:TextBox>
    <asp:ImageButton ID="calReqDateTo" runat="server" ImageUrl="" />
    <ajaxtoolkit:CalendarExtender id="CalendarExtender2" runat="server" targetcontrolid="txtToDate"
        format="dd/MM/yyyy" popupbuttonid="calReqDateTo" />
    reset iis and deployed my solution but when i deployed it throws error 
    "could not load file or assembly AjaxToolkit,Version=4.1.7.1213 "
    please help

    Hi,
    In this below thread they have discussed and resolved your issue.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/60fa19fe-86a0-446b-b61f-11a82fe4287f/how-to-implement-ajax-toolkit-for-sharepoint2013?forum=sharepointdevelopment&prof=required
    Please let us know if you need further details
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

Maybe you are looking for

  • ITunes Match showing different content on different devices

    I have recently signed up for itunes match and have connected three devices as follows: Windows 7 x64 PC running latest itunes 10.5.2.11 Apple ipad version 1 64gig 3G with iOS 5.01 iPhone 3GS 16gig with iOS 5.01 I have matched 4900+ songs from my PC

  • How can I view Sony HD videos

    I have a Sony HD video camera, a Handycam.  The camera came with a software called PMB which is only compatable for PC's.  The software enables the PC to view the HD video files.  My Macbook Pro is not able to view these videos and I can't figure out

  • Problem with OCR

    Gurus I am getting the following error root@node1 crs]# . ./root.sh WARNING: directory '/u01/app/oracle/oracle/product/10.2.0' is not owned by root WARNING: directory '/u01/app/oracle/oracle/product' is not owned by root WARNING: directory '/u01/app/

  • Why is iTunes Store not available in India?

    Buying  music, movies and books from the iTunes store is NOT allowed in India. WHY?

  • DELETE ASSIGNMENT...

    Hi, I have uploaded the Employee Assignment in test... I want to delete those Employee Assignments.... I have used the API to delete the assignment but it is not deleting.... hr_assignment_api.delete_assignment (p_validate => FALSE, p_effective_date