Showing posts with label dll. Show all posts
Showing posts with label dll. Show all posts

Tuesday, March 13, 2012

System.Resources.MissingManifestResourceException: How to edit .resources file

I downladed skmMenu ( a 3rd party menu) for ASP.NET application and I have made skmmenu.dll . After that I putmenu control on my webform, and start my application.I get the following error in browser. I guess this is a library issue!! Can somebody help.

Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "Menu.resources" was correctly embedded or linked into assembly "SkyMenu". baseName: Menu locationInfo: skmMenu.Menu resource file name: Menu.resources assembly: SkyMenu, Version=2.2.2078.30514, 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.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "Menu.resources" was correctly embedded or linked into assembly "SkyMenu". baseName: Menu locationInfo: skmMenu.Menu resource file name: Menu.resources assembly: SkyMenu, Version=2.2.2078.30514, Culture=neutral, PublicKeyToken=null
Source Error:
Line 1286:// If you are working on the skmMenu code base, this is in Menu.resx...Line 1287:ResourceManager manager = new ResourceManager( this.GetType() );Line 1288:script = manager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true).GetString("ClientScript");Line 1289:}Line 1290:this.Page.RegisterClientScriptBlock("skmMenu", script );
You need the Menu.resx file included in the dll's Project/Solution.
NC...

No Luck. Still getting same error.

Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "Menu.resources" was correctly embedded or linked into assembly "SkyMenu". baseName: Menu locationInfo: skmMenu.Menu resource file name: Menu.resources assembly: SkyMenu, Version=2.2.2081.16098, Culture=neutral, PublicKeyToken=null

System.Runtime.InteropServices.COMException

Hi,

I am using a VB6 dll in my asp.net application.

When I call a function of that dll, I get the following error:

System.Runtime.InteropServices.COMExceptionType mismatch.

The function I am calling expects a String, and I am passing in a String.

Here is the function call:

format.ProperCase(rs("Fname"))

Please help!

try

format.ProperCase(rs.Fields("Fname").Value.ToString() )


Thank you. Do I have to do this every time now? I am converting a classic ASP page to .NET and I make this function call a lot passing in recordset fields.

System.Runtime.InteropServices.COMException: Class not registered

Hello,
I'm trying to develop an ASP.NET application that uses a third-party COM
dll. I've added a reference to the dll in the web app project along with
adding a "using" directive in the code-behind (referencing the COM
namespace). Every time I try and run the application and call methods on th
e
COM object, I get the following error:
System.Runtime.InteropServices.COMException: Class not registered
I've successfully registered the dll using regsvr32 and added
the AspCompat="true" directive on the Page, but doesn't seem to help.
I'd really appreciate any suggestions on how to remedy this problem.
Thanks for your time.
DonnieAre u using VS.NET?
"Donnie" <Donnie@.discussions.microsoft.com> wrote in message
news:2A43630B-C5AE-4AC7-9656-EA496352E760@.microsoft.com...
> Hello,
> I'm trying to develop an ASP.NET application that uses a third-party COM
> dll. I've added a reference to the dll in the web app project along with
> adding a "using" directive in the code-behind (referencing the COM
> namespace). Every time I try and run the application and call methods on
the
> COM object, I get the following error:
> System.Runtime.InteropServices.COMException: Class not registered
> I've successfully registered the dll using regsvr32 and added
> the AspCompat="true" directive on the Page, but doesn't seem to help.
> I'd really appreciate any suggestions on how to remedy this problem.
> Thanks for your time.
> Donnie
>

System.Runtime.InteropServices.COMException: Class not registered

Hello,
I'm trying to develop an ASP.NET application that uses a third-party COM
dll. I've added a reference to the dll in the web app project along with
adding a "using" directive in the code-behind (referencing the COM
namespace). Every time I try and run the application and call methods on the
COM object, I get the following error:

System.Runtime.InteropServices.COMException: Class not registered

I've successfully registered the dll using regsvr32 and added
the AspCompat="true" directive on the Page, but doesn't seem to help.

I'd really appreciate any suggestions on how to remedy this problem.

Thanks for your time.

DonnieAre u using VS.NET?

"Donnie" <Donnie@.discussions.microsoft.com> wrote in message
news:2A43630B-C5AE-4AC7-9656-EA496352E760@.microsoft.com...
> Hello,
> I'm trying to develop an ASP.NET application that uses a third-party COM
> dll. I've added a reference to the dll in the web app project along with
> adding a "using" directive in the code-behind (referencing the COM
> namespace). Every time I try and run the application and call methods on
the
> COM object, I get the following error:
> System.Runtime.InteropServices.COMException: Class not registered
> I've successfully registered the dll using regsvr32 and added
> the AspCompat="true" directive on the Page, but doesn't seem to help.
> I'd really appreciate any suggestions on how to remedy this problem.
> Thanks for your time.
> Donnie

System.Runtime.InteropServices.dll not found.

HI, i am trying to reference the System.Runtime.InteropServices using C#, I can't find the dll anywhere. But VS.net didn't highlight System.Runtime.InteropServices statement. So I assume it is referenced.

When I do [MarshalAs (....)].

It says MarshalAs is not found, related namespace missing or not referenced, something like that.

1. How and where do I find System.Runtime.InteropServcies.dll?
2. what namespace I can find the MarshalAs?

thanksHi,
MarshalAsAttribute is part of System.Runtime.InteropServices namespace which resides in Mscorelib.dll assembly. No need for additional reference.
thanks for the reply,

[code]

using System;
using System.Runtime.InteropServices;

/// <summary>
/// Summary description for Class1.
/// </summary>
public class Class1
{
[DllImport("Kernel32.dll", LastAccessError=true)]
public static extern IntPtr FindFirstFile(string fileName, [ In, Out ] FindData findFileData);
}

[StructLayout(LayoutKind.Sequential)]
public class FindData
{
public int fileAttributes = 0;
public int creationTime_lowDateTime = 0;
public int creationTime_highDateTime = 0;
public int lastWriteTime_lowDateTime = 0;
public int lastWriteTime_highDateTime = 0;
public int lastAccessTime_lowDateTime = 0;
public int lastAccessTime_highDateTime = 0;
public int nFileSizeHigh = 0;
public int nFileSizeLow = 0;
public int dwReserved0 = 0;
public int dwReserved1 = 0;
[MarshalAs( UnmanagedType.ByValTStr, SizeConst = 256)]
public string fileName = null;
[MarshalAs( UnmanagedType.ByValTStr, SizeConst = 14) ]
public string alternateFileName = null;

}

[/code]

The above code is just a simple class that i do and it is from msdn.

compile error stops at [MarshalAs, saying Class1.cs(30): The type or namespace name 'MarshalAs' could not be found (are you missing a using directive or an assembly reference?)

what is the problem?

thanks

System.Security.SecurityException: That assembly does not allow partially trusted callers.

I developed a web site using .net 2.0, mysql 4.0 and IIS 5.0. The server is hosted by a third party.

I am using the MySql.Data.dll library version 5.0.7.0 to connect to the database. I did not create any custom assembly and I am using the MySqlData objects directly from the code:

using MySql.Data.MySqlClient;


MySqlConnection conn;
MySqlDataAdapter data_retriever;
DataTable TextDataTable;

TextDataTable = new DataTable();

data_retriever = new MySqlDataAdapter(last_query_executed.Value.ToString(), conn);

data_retriever.Fill(TextDataTable);

This is the error I get:

System.Security.SecurityException: That assembly does not allow partially trusted callers.

[SecurityException: That assembly does not allow partially trusted callers.]
search_search.BindData() +0
search_search.Page_Load(Object sender, EventArgs e) +30
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6978
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.search_search_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

My level of knowledge of .NET and Visual Studio is not advanced.

Do you have any suggestions?

Thanks,

Christian

Here is a post on the issue. It seems the current server configuration does not allow partial trusted callers.

http://bloggingabout.net/blogs/rick/archive/2006/04/07/11929.aspx -- this may not really apply becaus eyour site is hosted by a 3rd party

http://forums.mysql.com/read.php?38,95478,96748#msg-96748 -- has a link to download a new version of MySql assembly allowing partial trust. Not sure it will work, mixed results

http://forums.asp.net/t/999456.aspx -- has some other solutions. One of which is using a ODBC connection to MySql instead.

http://dev.mysql.com/tech-resources/articles/dotnet/ --see for ODBC driver details


I tried to recompile the library. However, I get a compilation error after I add the following line in the Assemplyinfo.cs:

[assembly: AllowPartialllyTrustedCallers]

Any ideas?

Christian


What error did you get? Also post your AssemblyInfo.cs file.


I fixed this problem, I was missing the following line:

using

System.Security;

however, now i am getting the error:

Unable to connect to any of the specified MySQL hosts.