powered by simpleCommunicator - 2.0.59     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / HttpHandler (C++ DLL) + Windows 2003 Server
3 сообщений из 3, страница 1 из 1
HttpHandler (C++ DLL) + Windows 2003 Server
    #32567691
slydiman
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Сделал свою DLLку на С++ с обработчиком HttpHandler. С++ не спроста, нужно хватать скриншоты с видеокамеры и выдавать JPEG. На IIS в Windows XP все прекрасно работает. На Windows 2003 Server при таком же web.config пишет:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: File or assembly name MyFile, or one of its dependencies, was not found.

Source Error: 

Line  7 :
Line  8 : <httpHandlers>
Line  9 :   <add verb="*" path="test.aspx" type="MyHandler.MyClass,MyFile"/>
Line  10 : </httpHandlers>
Line  11 : 

Source File: C:\Inetpub\wwwroot\web.config    Line:  9  

Assembly Load Trace: The following information can be helpful to determine why the assembly 'MyFile' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = MyFile
 (Partial)
LOG: Appbase = file:///C:/Inetpub/wwwroot
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: MyFile
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1. 1 . 4322 /Temporary ASP.NET Files/root/0b3fe3b1/5c4ba036/MyFile.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1. 1 . 4322 /Temporary ASP.NET Files/root/0b3fe3b1/5c4ba036/MyFile/MyFile.DLL.
LOG: Attempting download of new URL file:///C:/Inetpub/wwwroot2/bin/MyFile.DLL.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: MyFile, Version= 1 . 0 . 1630 . 26600 , Culture=neutral, PublicKeyToken=null

Что не так? Где что прописать?
...
Рейтинг: 0 / 0
HttpHandler (C++ DLL) + Windows 2003 Server
    #32568390
slydiman
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
1. Нужно утилиткой sn.exe сгенерить ключик:
sn -k keyPair.snk
sn -i keyPair.snk MyContainer
и потом указать MyContainer в строке
[assembly:AssemblyKeyNameAttribute("MyContainer")];
в файле AssemblyInfo.cpp
Сборка (DLLка) будет содержать strong name.

2. В панели управления в Microsoft .NET Framework 1.1 Wizards
нужно указать для данной сборки Full Trust

3. Еще через Microsoft .NET Framework 1.1 Configuration или утилитой gacutil.exe можно добавить DLL в кэш.

-------------
Теперь другая напасть! Под WinXP даже без описанных ухищрений все работает, под Win2003 получаю:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Exception of type System.StackOverflowException was thrown. 
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.StackOverflowException: Exception of type System.StackOverflowException was thrown.

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.  

Stack Trace: 
[StackOverflowException: Exception of type System.StackOverflowException was thrown.]

Куда дальше копать? :'(
...
Рейтинг: 0 / 0
HttpHandler (C++ DLL) + Windows 2003 Server
    #32569360
slydiman
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
оказывается проблему вызывала строка

Код: plaintext
unsigned char bPixels[ 720 * 576 ];

пришлось ее заменить на

Код: plaintext
1.
Byte tempBytes __gc[] = new Byte __gc [ 720 * 576 ]; // Create managed array of Byte's
BYTE __pin *bPixels = &(tempBytes[ 0 ]);           // Pin managed array

и тогда на Win2003 Server ошибка Sysytem.StackOverflow пропала!
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / HttpHandler (C++ DLL) + Windows 2003 Server
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]