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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Very strange DllImport / LoadLibrary Issue

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :.NET Framework

Hi all,

Please bear with me, as the description of the problem is fairly involved :)

I've got a strange issue when I am calling a function in an MFC C DLL declared with a DllImport from a .Net user control.

When I display the user control in a standalone application it works fine. I have migrated the component to our main product, which launches a new process, dynamically loads the assembly containing my user control (loading using the Assembly.Load passing in the bytes), hosts the component on a windows forms and displays it.

When run in this context, the first time one of the DLLs methods is called I get a message box saying "<PATH>\<COMPONENT_FULL_TYPE_NAME> was not found" where <PATH> is the root path of the application that initially lauched the process (in our cases this is two processes down Launcher -> Application -> Hosting Process). <COMPONENT_FULL_TYPE_NAME> is the name of the .Net user control that is calling the method in the DLL).  The same behavior occurs if I try to load the DLL using LoadLibrary. It doesn't occur with other DLLs I call or load in a similar way.

This had me scratching my head for a while until I started ProcessExplorer (ex-sysinternal thing) and it showed that when the LoadLibrary is called then a read is attempted for this file it is complaini

View Complete Post

More Related Resource Links

RSS Viewer Web Part Bug or Strange Issue?

This started out as a simple proof of concept but may be a bug.  I have added 3 RSS Viewer web parts to a page with the following URLs http://feeds.feedburner.com/sharepointteamblog?format=xml http://msdn.microsoft.com/en-us/subscriptions/subscription-downloads.rss http://rss.news.yahoo.com/rss/yahoonewsroom and everything works perfectly / each part renders as expected. I then added each of these URLs to a links list and then added the links list web part to the page.  I selected one of the RSS Viewer parts, chose connections -> “Get Feed URL from” -> “Links List” and then chose URL as the connection field.  What is happening is that the SharePoint Team Blog link works great, the MSDN link throws a SecurityException and the Yahoo link does nothing (no error in the log and nothing displayed).  I tried this on two different servers on different network & ISPs both with no firewalls in the way.  This appears to be an issue with how the web part handles a connection compared to the straight web part property. Any thoughts or someone else verifying the issue on their server would be appreciated. Regards,-James

Strange DataGridColumn Binding issue


Hi all,

I'm looking for a way to debug this problem I'm having with binding expressions in my DataGrid.

I've got a data grid that I create columns for on the fly in c# code.  I create DataGridTemplateColumns based on a data class that has an internal dictionary and implements ICustomTypeDescriptor.  I create columns for each of the dictionary's keys.  This all works just dandy, except for one thing.  My output window gets a bunch of these (one for each property):

System.Windows.Data Error: 39 : BindingExpression path error: 'ID' property not found on 'object' ''Object' (HashCode=17704875)'. BindingExpression:Path=ID; DataItem='Object' (HashCode=17704875); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')

To debug, I created a converter and removed the Path.  Usually, when I stop the debugger in the converter, the "object" parameter is what I would expect - an instance of my data object.  However, sometimes (as above), the "object" is just an "object" with no further defined type (thus causing this debug output).  I'm a bit at a loss as to why the "object" in the converter is not an instance of my data object. 

Again, all the code seems to work fine.  The data g

NLB - Strange Time out issue with 2 WFEs MOSS 2007 ?



 I am having a MOSS 2007 environment with the follo.


Having  Two front end servers – each individual  Hyper-V  and   1 Index Server.

These WFEs  are Virtual Servers with Windows 2008 64 bit OS.

I configured the Windows Load balancing.

Very strange issue.



I have my textbox under tabpanel.

But when page created i can see the textbox id come very long containing the whole controls id lik:

<input id="TabContainerContent1_Basic_txtNumber" value="33333333333" maxlength="12" type="text" name="TabContainerContent1$Basic$txtNumber" />

I am doing it with xslt as belwo.

<field id="txtNumber" type = "Number" default="" >  </field>

here is xslt.

<xsl:if test="@type='Number'">
                        <asp:TextBox id="{@id}" value="{@default}"  runat="server"  />

Please suggest me what is wrong with it?

Strange issue with a huge SSRS 2008 report (supposed to return 3 million records)



NOTE: The strange part (as mentioned in title) will come in the end.

I am running a SSRS 2008 report which fetches 3 million records from a remote server. After around 1 hour the report processing stops and I see an error icon on the lft bottom of the browser window. When I click on that to see the error details it shows some PageRequestManagerSQLErrorException with an unknown error message with code 12029 (sometimes 12002).

When I see the reportserver logs there is an error message logged in it which says "Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. ---> Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. ---> System.InvalidOperationException: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached."

The <DatabaseQueryTimeOut> value in the report server configuration file is already having a value set to 7200 seconds(2 hours).<

Strange Calendar issue - Missing Data, only on last day of month


Hi. I'm using Sharepoint 2007 and we're experiencing a strange issue. In the Month view, if I look at the month of September, September 30th appears to have 15 items.  Clicking on the date displays these 15 items, but there should be considerably more. The entire day's schedule stops at 6:30 am. If I view the month of October, and look at the September 30th date, it indicates that there are 36 items, which is the correct number.  This pattern happens regardless of which month I'm looking at. It's always the last day of the month affected. The number of missing items varies from month to month, generally around 20 items. I'm baffled, and haven't got a clue how to attempt to troubleshoot this issue.

I would greatly appreciate any suggestions on how to attempt to resolve this!

Strange time issue on simple select statement


Hi, I have a strange time out issue on a simple select statement.
This is my select statement:

Select * from DyGeJournal where ord>=4609635 and Fracsec>=31

The ord and Fracsec is the primary key.
When I ask for the actual excecution plan, he is using a an index seek.
It takes more than 1,5 minutes to get a result back.

When I shrink my database, everyting is running as expected, the query above runs in milliseconds.
After a while (2 weeks) it start agian running very slow.

I have the same logic on other tables, but I don't have the problem on those tables.
What can cause this problem?

NLB - Strange Time out issue with 2 WFEs MOSS 2007 ?



 I am having a MOSS 2007 environment with the follo.


Having  Two front end servers – each individual  Hyper-V  and   1 Index Server.

These WFEs  are Virtual Servers with Windows 2008 64 bit OS.

I configured the Windows Load balancing.

In these 2 WFEs Two sites are deployed (One is Team site and One Publishing site) both are intranet sites.


Now the issue I am facing here is:


Assume that Tower1 and Tower2 are 2 different locations.

 We have a VLAN setup  Web sites are working in same VLAN[say Tower1] where Servers are set up without any issue.

But Web sites are giving Time out issue when it is accessed from different location VLAN [Tower2], after some clicks or web site navigations and website will be up after few minutes.

But the site  is working in different VLAN within in same location[Tower1 or Tower2] where server are set up


When web site is timing out in different location VLAN [Tower2], web site is timing out in all the locations and we will not able to connect to front end servers remotely. But same time we are able to connect to hyper–V  and from there, able to connect to front end servers, web site is accessible from there without any i

Strange issue on domino ldap - accumulation of groups



I need help at following problem:

I query all groups of a user and show them in a listbox. This works well with Active Directory. But on domino server the same code accumulates the groups for different users.

For example: User1 is member of groupA and groupB, User2 is member of groupA and groupC

The first query for User1 is correct, listbox contains

groupA and groupB.

The second query for User2 contains groupA, groupB, groupA and groupC. The groups of the first query are also returned.

This issue is only on domino server (it's not a listbox failure, the second query return 4 groups). This behaviour continues - another query for User1 now returns 6 groups and so on.

Has someone an idea?





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:


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


Strange Photo upload problem


I'm working project it's live on shared hosting

we'er uploading photos to a file on the server everything works fine the photo is resized renamed and sent to the folder

the upload page returns the thumbnail and the full size photo it's there all the photos have to be approved by an admin

twice now after they have been approved they disapear I checked the folder they are not there could there be anywhere

on the server they could get hung up before they go into the folder I have it setup so when you delete the data base entry it deletes the photo from the folder othe than that you need to open the folder and delete the photo this has hapened twice now I tried to recreate it with no luck

thaks for your help in advance

MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

xpath issue


Hi i am using xpath to loop through each node,

the xml is below i can get the value of "link" but i cant get the thumbnail value, have you got any ideas how i can do this, my code is below.



     <link>test 1</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />



     <link>test 2</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />


public void FindLinks(XPathNavigator p_xPathNav, DataTable dt)
            //run the XPath query
            XPathNodeIterator xPathIt = p_xPathNav.Select("//item");

            //use the

User validation Issue in xlsx file



I am validating user from Login.xlsx file. It was working fine by validating email and password from that file. For testing i got new file same contents of file but added some more user names.

So after that when i validating the user i am getting the following error "Data type mismatch in criteria expression".

But when i replaced the new to old one it is working fine. The contens of both files are the same. So why this kind of error happened.


Multiple Paramatized Threading issue


I need the funcitonality to have two methods run concurrently of each other and the parent thread (aka the method that makes these two calls) to halt until BOTH are done. After the threads are done, I need to perform logic on the returns of the method, so it is essential for both of them to be complete before the parent thread continues. I have searched the internet and tried varous attacks, and I always come up with the same result, this being the parent thread continues operation after the first thread finishes, leaving the second thread running.  Can someone show me a quick example of how I can do this. I have tried checking states of the threads, halting the threads, but I always end up with the same thing. Any help would be great. Thanks.

Data Truncation issue with Enterprise Library Logging WriteLog stored Proc


Hi ,

I'm using Enterprise Library Logging  feature for logging. The issue i am facing is when the Logging message is too large(more than 65534 chars) ,complete data  is not logged in the Formatted Mesage column which is  of data Type nText .

I am able insert complete data if i try inserting from Sql insert Query from sql management studio. Do i need to add any attributes to data base listener or do i need to change the sp.

 Is there any way to increase the WriteLog stored proc param size in EnterpriseLibrary.Logging config file ? . Please let me know.


Thanks In Advance.

Word Automation Issue in Windows Server 2008 Hosting



The problem I am posting here is that I was facing nearly 2 weeks around. Any body comes with this stuff please help.

Word Automation in sample ASP.NET(C#) application.

I am using Microsoft.Office.Inetrop.Word Assembly for automation. Here I am reading a XXX.dot template file and fill the contents with dynamic data.

When i am executing my code in localhost:someportnumber the automation is working fine and I could get expected result and when I am hosting in my inetmgr(Windows XP is my OS) it is also working fine.

But the problem is that when I am hosting in my production server(Windows Server 2008 Standard Edition) I am not able to perform automation and results in the following error.

Data: System.Collections.ListDictionaryInternal
Message: Word has encountered a problem.
Source: Microsoft Word

The code gets failed in the following line:

ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

Document wordDoc = wordApp.Documents.Add(ref oTemplate, ref oFalse, ref oMissing, ref oMissing); // Error in this line

I cannot able to proceed further. Can anybody please help me in solving this issue?

Thank you.

With Regards,


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