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

Top 5 Contributors of the Month
Post New Web Links

Process.Modules Not Returning Correct Values in x64

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Windows Application
Hey All!   Here is my problem, when i use the following code:   Process hProcess = (.....); foreach (ProcessModule m in hh.Modules) { Console.WriteLine(m.ModuleName + " - " + m.BaseAddress); }   On a 32bits machine I get like 20 different values, those are the ones I use further in my program. However in a 64bits machine I only get: myexe.exe, ntdll.dll, wow64.dll, wow64win.dll and wow64cpu.dll.   I also tried EnumProcessModules, but got the same result.   How may I get the correct values I need?   My .NET exe is compiled at 32bits and the target process is also 32bits.   Thanks, Best Regards, Mywk

View Complete Post

More Related Resource Links

ASP.NET Architecture - ASP.NET Worker Process - HTTP Pipleline - Http Modules and Handlers

"ASP.NET is a powerful platform for building Web applications, that provides a tremendous amount of flexibility and power for building just about any kind of Web application. Most people are familiar only with the high level frameworks like WebForms and WebServices which sit at the very top level of the ASP.NET hierarchy. In this article I'll describe the lower level aspects of ASP.NET and explain how requests move from Web Server to the ASP.NET runtime and then through the ASP.NET Http Pipeline to process requests.

Control Values When Returning to Page


Why do controls value not persist when returning to a page (e.g. via browser back button)?  If I set control values without utilizing a post back the controls will maintain their last value when I return to the page.  If I set a control value and then call a post back, the control value is reset to the default value when returning.

I have many pages with a gridview, and a textbox which is used to filter the gridview contents.  I set the filter textbox, filter the gridview (postback), go to another page, and when I return to the gridview page (via back button), my filter textbox is reset empty, and the gridview is the original (unfiltered) data.

What concept am I missing here?

Thanks in advance...

Finding correct "system.webServer / modules / add"

For example, in web.config you can use... <system.webServer>      <modules>         <remove  name="DefaultAuthentication"     />         <add     name="DefaultAuthentication"     type="System.Web.Security.DefaultAuthenticationModule" />      </modules>   </system.webServer> ...for getting rid of precondition="managedHandler". Where can I find the names and types of the other modules? I suspected that somewhere in the hierarchy there should be some XML describing the defaults. However, I cannot find it. Am I missing some machine.config, web.config file? Michael G. Schneider

Gridview RowCommand Event returning null values

HiI'm trying to retreive values entered by users in the textboxes in the footer of the gridview and insert these values into another sql table.My code is as follows :-protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)    {       if(e.CommandName.Equals("addnew"))       {                       TextBox t1 = (TextBox)GridView2.FooterRow.FindControl("tfrm");            string frm = t1.Text;            TextBox t2 = (TextBox)GridView2.FooterRow.FindControl("tsub");            string sub = t2.Text;            string cmd = "insert into suggestions values('" + frm + "','" + sub + "','c','c')";            con.Open();            SqlCommand com = new SqlCommand(cmd,con);            int a = com.ExecuteNonQuery();&n

WCF service returning old values

Hi. I am developing an application with WCF services. The basic functionaloty of a screen is to provide an entry screen to add particular entity. Once save even fired It will save the data to the database and call the bind method to bind into the grid by refreshing the latest data. When I am running the site from my source (Visual Studio) , it works perfectly. When the client calls method to fetch the data the WCF service, it returns latest (added) data. But the issue comes in the server when it works with IIS. I deployed the code in the server, once the data added I am getting the old data only. But after two refresh I am getting the latest data. Could you please let me know what required to be done to get the latest record. Many Thank, Kelvin Kumar

Custom membership provider not returning values from my web.config


I created a custom membership provider in my ASP.NET 4.0 web site, stored  in App_Code, and referenced in my web.config.

However, it doesn't appear to be pulling values out of web.config during initialization.

The code was taken from http://www.asp.net/general/videos/how-do-i-create-a-custom-membership-provider, and the only modifications were changing "connectionStringName" here to the name of my connection string:

    Dim ConnectionStringSettings As ConnectionStringSettings = _

The connection string always comes back as nothing in this line:

    If ConnectionStringSettings Is Nothing OrElse ConnectionStringSettings.ConnectionString.Trim() = String.Empty Then
      Throw New ProviderException("Connection string cannot be blank.")
    End If

No matter what I change the password format to in web.config, the default value here is always used:

    Dim temp_format As String = config("passwordFormat")
    If temp_format Is Nothing Then
      temp_format = "Has

spgridview RowDataBound event returning cell values as empty


i am working with SPGridView to display Announcements. User should be able to edit his own created Announcements.Remaining Items shouldnt be having edit option.

i created SPGridView Columns :

                SPBoundField Title = new SPBoundField();
                Title.HeaderText = "Title";
                Title.HeaderStyle.Font.Bold = true;
                Title.DataField = "Title";

                SPBoundField Description = new SPBoundField();
                Description.HeaderText = "Description";
                Description.DataField = "Description";


Visualizer correct, wrong values in watch. \ delimiter added (NVARCHAR datatype)


I dont get it, a nvarchar[255] variable exists in our sql server 9.0.3080. 


Adder per additional duct over 3 ducts in slick bore
Aerial 0-1000'
Aerial 1001'-10,000'
Air Compressor w/tools
Air Driven Pump
Arrow Board
As-Built Documentation
Bore Depth over 30' adder
Bore HDPE Casing Adder ( up to 4")
Bore HDPE Casing Adder (> than 12")
Bore HDPE Casing Adder (>4", up to 8")
Bore HDPE Casing Adder (>8", up to 12")

  1. I query the entire table, and store to DataSet.
  2. create string[] of tablesize, loop table rows and store value
  3. watch on the dr["column"] is always showing  "Bore HDPE Casing Adder ( up to 4\")"
  4. if you click text visualizer the correct value (same as sample data) shows!
  5. my strings are always saved with the wrong value (including the \)

Please help!

How to display correct values from sql table?


Hello everyone. I need help writing a snippet.

 Aim to present data base values are in between numbers that are worth the value selected earlier.

Example I have bind combobox to sql table and I have selected value from another combo.

In sql table there are values = 1001,1005,2005,3060,4008 etc..

if I chose chose number = 1000 I must to desplay in combo box only this values 1001,1005 if I chose 2000 display 2005.


Class Not returning accurate values


Hello guys,

Please can anyone look at this class and say why it's just returning just the first row in the second query, the issue is that the

Salary is showing the right value when debugging, but when deployed to IIS it's just returning the 1st row

Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Linq
Imports Telerik.Web.UI
Imports EMPTaxesLINQ
Namespace EmployeeTaxes.DataLoad
    Public Class GetData
        Public Shared Function GetSalary(ByVal sEmployeeID, ByVal Sdate, ByVal Edate) As Decimal

            Dim sMonth, eMonth, sYear, sEMPID, AbsenceTotal, SalaryType As Integer
            Dim DailyRate As Decimal
            Dim db As New EMPTaxesLINQ.EMPDCDataContext()
            Dim salary As Decimal = 0
            sEMPID = Convert.ToInt32(sEmployeeID)
            'get salary type

select returning a list of values seperated by commas


I’m performing a select statement that returns the primary key of all the records matching  certain criteria. Instead of the returned set having  a row for each record returned, I want to just return just  one record that consists of a text field containing all the primary keys separated by commas.


For example:

Select personID from people

Where age < 45


Instead of:

SSIS_SQL2005_Sharepoint ListSource Adapter_DT_NTEXT values returning NULL on extract/import


Hello.  Please HELP!!!!  I've been trying to figure this out for a few days.

I am using the SSIS SharepointAdapters for 2005.  When I pull data from my sharepoint site, for fileds that are choice fields in sharepoint are a datatype of DT_NTEXT w/4000 characters.  The only thing in these fields is "PASS" " "FAIL" and one filed has "QA Review Completed".  When the data is imported into SQL these fields eiher show NULL or <Long Text>.  I am using the combination of the Derived Column and Data Conversion to change the Datatype of these fields from DT_NTEXT since no output will accept this datatype.  I've tried exporting to Excel, Access and Flat files only to get same results.  What I don't understand is if I import the data from Sharepoint to Access or Sharepont to Excel using Sharepoint and not SSIS, I get the data that is in the field(s).

I've searched all over the internet and have not found where anyone has had the same issue which I find to be odd - I can't be the only one.  I hope I'mnot.




Web method called from JavaScript not returning correct type


Hello all-

I have a web method written in VB.Net, coded as follows:

<OperationContract()> _
        Public Function HowManyExportsLeft(ByVal userId As Integer) As Boolean
            _UserId = userId
            Dim MaxExports As Integer = Me.UserSettings.ExportSettings.ExcelExportSettings.MaximumNumberOfExports
            Dim MyExports As Integer = Me.UserSettings.ExportSettings.ExcelExportSettings.MyExportCount
            Dim returnValue As Integer
            If MaxExports = Integer.MaxValue Then
                returnValue = 999
                returnValue = MaxExports - MyExports
            End If
            Return returnValue
        End Function

Now, on the ClientClick method of an asp:Button, I call the following method :

function CheckExportsRemaining() {
    var hdnUserId = $get(CalcResults.Controls.hdnUserId);
    Services.Common.HowManyExportsLeft(hdnUserId.value, ExportCount_complete);

Which of course on success calls this callback method:

function ExportCount_complete(result) {
    if (result <= 3) {
        eACommonDialog.ShowDialog(getURLString(aspxSiteUrl, 'TrialExports.aspx?exportsRemaining=' + result), 420, 215, '', 75, false, true, '', false

Selecting Returning values from sql database in asp.net 2.0 codebehind and c#



 Is there a way of selecting returned values from a call to an sql database in the code behind? For example assume that I used the following to select values from a table called Products;


              SELECT  Price, Qty, Numbersold FROM Products


How can I now get the returned values e.g.  Price  in the c# codebehind and display it in a textbox? I know that in the asp markup that I can use EVAL and Bind statements to do this for example I can do Eval("Price")  but is there a way of getting any of the selected values (Price, Qty or Numbersold)  in the codebehind?

I know that I can use three separate select statements and  make three separate calls to return each value and then do something like the following

Price = Convert.ToInt32(myCommand.ExecuteScalar());


But using three separate calls is very inefficient!






Returning identity values within an XML document




Suppose that I have 2 tables that represent a Master-Detail relationship: Order(#ID_Order int) and OrderLines(#ID_Line int, *ID_Order int). Both primary keys are identity columns, and the rest of the columns are omitted for clarity. This 2 tables are filled by using a client application, a classic form that has a header section for the Master and a grid for the Detail.


In the old days, I would use an stored procedure (SP_Save_Order) in order to save into the Order table, which returns the identity value for the #ID_Order column and then iterate for each Line in the form, invoking another stored procedure (SP_Save_OrderLine) using the returned #ID_Order value and returning the new identities for #ID_Line as well. So, multiple round trips are made. Those stored procedures have an IF statement which checks if the Order/OrderLine exists, if they don't an INSERT is made -an UPDATE otherwise. That's why the importance of returning the Identity values to the client application: A new document can be saved at a first instance -but modified later.


Now, I have learned that by using the XML datatype and XQuery I can save in just one trip the Order and the OrderLines (if the order is new).  Consider the following simple docum

Check the if SSAS Roles property is used in excel connection string before returning the values



We are using Excel 2007 to connect to SSAS cubes. We have many roles for a user and all having different permission including different VISUAL TOTAL setting. We want to restrict the user so that he cannot see anything if he is not using the ROLES property in the excel connection string.

At the run time I want to know if the user who is using excel has used ROLES property or not.

Any help will be appreciated

Mr myName

search not returning correct results


On my sharepoint, when I enter in bayliners in my search it returns me nothing related to bayliner boats, but when I enter in bayliner it returns me everything bayliner related, how can I get my search to return data for bayliner even though the user entered in bayliners in the search box?

My search results page is using an XSL file to show the data

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