Click here to Skip to main content
15,888,610 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Can we add a cancel button inside an asp.net wizard control? Pin
r a m e s h6-Jul-09 22:49
r a m e s h6-Jul-09 22:49 
GeneralRe: Can we add a cancel button inside an asp.net wizard control? Pin
meeram3956-Jul-09 22:59
meeram3956-Jul-09 22:59 
GeneralRe: Can we add a cancel button inside an asp.net wizard control? Pin
r a m e s h6-Jul-09 23:26
r a m e s h6-Jul-09 23:26 
GeneralRe: Can we add a cancel button inside an asp.net wizard control? Pin
Abdulhafeezo6-Jul-09 23:28
Abdulhafeezo6-Jul-09 23:28 
GeneralRe: Can we add a cancel button inside an asp.net wizard control? Pin
r a m e s h7-Jul-09 0:20
r a m e s h7-Jul-09 0:20 
GeneralRe: Can we add a cancel button inside an asp.net wizard control? Pin
meeram3957-Jul-09 1:25
meeram3957-Jul-09 1:25 
QuestionProblem with IE Pin
Vimalsoft(Pty) Ltd6-Jul-09 21:38
professionalVimalsoft(Pty) Ltd6-Jul-09 21:38 
QuestionIIS 6 to IIS 7 not working with unmanaged code Pin
Le Sourcier6-Jul-09 21:20
Le Sourcier6-Jul-09 21:20 
I've got an IIS v6 (Windows Server 2003) web site which uses an old DLL written with unmanaged code. (Aspx, C# using System.Runtime.InteropService to call unmanaged dll)

But I've bought a new Windows Server 2008 with IIS7 and the call to unmanaged DLL is not working.

In fact my C# code call an unmanaged DLL but the code never ends. It's entering in DLL code (all is working until the "return"; instruction, but it does not return to C# !!).

I've tried to configure the application pool (classic mode), the web site properties... but to hard for me.At a time I got the error "IIS Worker Thread stop working"!



A sample:

ASPX
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:Table runat="server">
        <asp:TableRow>
            <asp:TableCell>
                <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    </div>
    </form>
</body>
</html>




CS


using System;
using System.Runtime.InteropServices;

public partial class _Default : System.Web.UI.Page
{
    [DllImport("MyDLL.dll", EntryPoint = "?get_html@@YAPBDN@Z")]
    static extern string get_html(double value);
    
    protected void Button1_Click(object sender, EventArgs e)
    {
        Random a = new Random();
        Literal1.Text = get_html(a.NextDouble());
    }

}




DLL C++

#include "stdafx.h"
#include "stdio.h"

char myBuffer[MAX_PATH];

__declspec(dllexport) const char * get_html(double value)
{
    memset(myBuffer, 0x00, MAX_PATH);
    sprintf(myBuffer, "<html><title>Test</title></head><body>Entered value : %.2f<br>Value x2 = %.2f</body></html>", value, value*2);
    return myBuffer;
}










With IIS6, when the button is clicked the HTML text is displayed (all is good). With IIS7 nothing is happening !



Any idea ?



Thanks for help !

Le Sourcier

AnswerRe: IIS 6 to IIS 7 not working with unmanaged code Pin
Member 1302000829-Nov-17 6:25
Member 1302000829-Nov-17 6:25 
QuestionProblem With Radion Button List Pin
ais076-Jul-09 20:08
ais076-Jul-09 20:08 
AnswerRe: Problem With Radion Button List Pin
r a m e s h6-Jul-09 22:38
r a m e s h6-Jul-09 22:38 
QuestionAbout Web Service Pin
Deepak the Cool6-Jul-09 19:48
Deepak the Cool6-Jul-09 19:48 
AnswerRe: About Web Service Pin
N a v a n e e t h6-Jul-09 20:14
N a v a n e e t h6-Jul-09 20:14 
GeneralRe: About Web Service Pin
Deepak the Cool6-Jul-09 20:52
Deepak the Cool6-Jul-09 20:52 
Questionhow can i reset list box selected index after button click event in asp.net? Pin
anish27patel6-Jul-09 19:44
anish27patel6-Jul-09 19:44 
QuestionDeleting is not supported by data source 'SqlDataSource1' unless DeleteCommand is specified. Pin
haleemasher6-Jul-09 19:38
haleemasher6-Jul-09 19:38 
AnswerRe: Deleting is not supported by data source 'SqlDataSource1' unless DeleteCommand is specified. Pin
Abhijit Jana6-Jul-09 20:09
professionalAbhijit Jana6-Jul-09 20:09 
GeneralRe: Deleting is not supported by data source 'SqlDataSource1' unless DeleteCommand is specified. Pin
haleemasher6-Jul-09 20:33
haleemasher6-Jul-09 20:33 
GeneralRe: Deleting is not supported by data source 'SqlDataSource1' unless DeleteCommand is specified. Pin
J4amieC6-Jul-09 23:43
J4amieC6-Jul-09 23:43 
AnswerRe: Deleting is not supported by data source 'SqlDataSource1' unless DeleteCommand is specified. Pin
Licky Nguyen22-Jul-09 1:02
Licky Nguyen22-Jul-09 1:02 
QuestionAnchror tag probelm Pin
indian1436-Jul-09 19:17
indian1436-Jul-09 19:17 
Questiondynamically added checkbox doesn't fire the event. Pin
prasadbuddhika6-Jul-09 19:06
prasadbuddhika6-Jul-09 19:06 
AnswerRe: dynamically added checkbox doesn't fire the event. Pin
N a v a n e e t h6-Jul-09 20:21
N a v a n e e t h6-Jul-09 20:21 
Questiondetect bluetooth device Pin
nithydurai6-Jul-09 19:04
nithydurai6-Jul-09 19:04 
AnswerRe: detect bluetooth device Pin
Abhijit Jana6-Jul-09 19:10
professionalAbhijit Jana6-Jul-09 19:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.