1

Closed

Samples not working

description

Hi,

This is Sunil Pottumuttu.

I downloaded the zip file.

These are the steps i followed

STEP 1:

created virtual directory in IIS pointing to the "Helloworld' directory.

STEP 2:

copied the following files to "Helloworld\bin" directory
IronPython.dll
IronPython.Modules.dll
Microsoft.Scripting.Core.dll
Microsoft.Scripting.dll
Microsoft.Scripting.ExtensionAttribute.dll
NWSGI.dll

STEP 3:

copied the following files to "helloworld"  directory

helloword.wsgi
"web.classic.config" by renaming as "web.config"

here is the web.config file contents

<?xml version="1.0"?>
<configuration>
    <configSections>
        <section name="wsgi" type="NWSGI.WsgiSection" />
    </configSections>

    <wsgi />
   
    <system.web>
        <compilation debug="true" />

        <httpHandlers>
            <add verb="" path=".wsgi" type="NWSGI.WsgiHandler" />
        </httpHandlers>
    </system.web>
    <system.webServer>
        <handlers>
            <add name="WsgiHandler" path=".wsgi" verb="" type="NWSGI.WsgiHandler, NWSGI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=41e64ddc1bf1fc86" resourceType="Unspecified" />
       
        </handlers>
        <validation validateIntegratedModeConfiguration="false" />
    </system.webServer>
</configuration>

STEP 4:

In Internet explorer navigated to the following url http://localhost/HelloWorld/hello.wsgi

i got the following error

Here is the error. do i need to do any thing.

Server Error in '/' Application.

Could not load file or assembly 'NWSGI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=41e64ddc1bf1fc86' or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly 'NWSGI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=41e64ddc1bf1fc86' or one of its dependencies. The system cannot find the file specified.

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. 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'NWSGI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=41e64ddc1bf1fc86' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

Stack Trace:

[FileNotFoundException: Could not load file or assembly 'NWSGI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=41e64ddc1bf1fc86' or one of its dependencies. The system cannot find the file specified.]
   System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +78
   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
   System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +64
   System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +51
   System.Web.Configuration.HandlerFactoryCache.GetHandlerType(String type) +18
   System.Web.Configuration.HandlerFactoryCache..ctor(String type) +16
   System.Web.HttpApplication.GetFactory(String type) +56
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161

 

Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434 

 

 

STEP 5:

since i got error
I tried the same thing by copying "web.integrated.config" by renaming as "web.config"

then i got the following error

Server ErrorInternet Information Services 7.0

Error Summary

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error InformationModule IIS Web Core

Detailed error information

Notification BeginRequest
Handler Not yet determined
Error Code 0x8007000d
Config Error The configuration section 'wsgi' cannot be read because it is missing a section declaration 
Config File \?\C:\work\HelloWorld\web.config
Requested URL http://localhost:80/HelloWorld/hello.wsgi
Physical Path C:\work\HelloWorld\hello.wsgi
Logon Method Not yet determined
Logon User Not yet determined

 Config Source
    3:     <system.webServer>
    4:         <wsgi />
    5:        
 Links and More InformationThis error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
View more information »

what should i do to rectify this error...?

Thanks & regards,
Sunil Pottumuttu

file attachments

Closed Jun 27, 2009 at 7:40 PM by
As best I can, tell all of these issues have been resolved.

comments

py_sunil wrote Mar 3, 2009 at 3:13 AM

please find the attached zip file which i had in my machine

jdhardy wrote Mar 5, 2009 at 12:40 AM

Hi Sunil,
I think I've figured out the issue - it appears you are using the IronPYthon DLLs from an older version of IronPython (RC1 maybe?). Download IronPython 2.0.1 (http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=12481) and replacing the assemblies you have with the ones from that package.

py_sunil wrote Mar 7, 2009 at 4:03 AM

as suggested by you i downloaded the latest release of ironpython . i got this error.please find the attached zip

Server Error in '/helloworld' Application.

Could not load file or assembly 'IronPython, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly 'IronPython, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

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:


[FileNotFoundException: Could not load file or assembly 'IronPython, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
NWSGI.WsgiHandler..cctor() +0

[TypeInitializationException: The type initializer for 'NWSGI.WsgiHandler' threw an exception.]

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +268
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1036
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +114
System.Web.Configuration.HandlerFactoryCache..ctor(String type) +54
System.Web.HttpApplication.GetFactory(String type) +56
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161

Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434

jdhardy wrote Mar 12, 2009 at 12:42 AM

Hi Sunil,
The NWSGI and IronPYthon files need to be in a bin folder - you had them all in the same directory.

I've attached HelloWorld-good.zip which works on my machine. Can you try it on yours?

nirataro wrote Jun 4, 2009 at 10:30 PM

I have similar problem. I am using nwsgi preview 1.2 on Vista. I got this error

Filename: \?\C:\Repository\HelloWorld\hello.wsgi\web.config
Error: The configuration section 'system.webServer/wsgi' cannot be read because it is missing a section declaration

nirataro wrote Jun 4, 2009 at 10:31 PM

I installed nwsgi.dll on the GAC and put the five requisites IP 2.6 Beta 1 in the bin. Still the same error.

nirataro wrote Jun 4, 2009 at 10:39 PM

I tried helloworld-good.zip on IIS 7.0 integrated mode, it fails as well.

"Exception Details: System.Runtime.InteropServices.COMException: Filename: \?\C:\Repository\HelloWorld\hello.wsgi\web.config
Error: The configuration section 'system.webServer/wsgi' cannot be read because it is missing a section declaration"

jdhardy wrote Jun 5, 2009 at 4:27 AM

@nirataro: are you running Windows 7 by any chance?

nirataro wrote Jun 5, 2009 at 9:15 AM

Vista 32 bit on IIS 7.0 managed pipeline.