[IronPython] Iron Python and Asp.net (framework 3.5)

Patrik Hägne patrik.hagne at sembo.se
Fri May 8 06:24:00 PDT 2009


The project in question is not a "web site" but a "web application" so I'm still interested in how to make that work. I did a quick spike on compiling it myself yesterday but it seemed to be a bigger problem than just removing that and recompile, but it might be that I also reset the projects to use the 3.5 framework version. Do you mean that I should reference System.Core but keep the framework version 2?
 
Cheers,
Patrik
 
Från: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] För Curt Hagenlocher
Skickat: den 8 maj 2009 15:17
Till: Discussion of IronPython
Ämne: Re: [IronPython] Iron Python and Asp.net (framework 3.5)
 
As I recall, we were never able to come up with a workaround for a VB "web site", but a VB "web application" could be made to work.

It would be easier if IronPython could depend on .NET 3.5, but we still have customers who need it to work on 2.0 and 3.0. There's nothing to prevent you from recompiling IronPython yourself, though -- just remove Microsoft.Scripting.ExtensionAttribute.csproj from the solution and add references to System.Core instead.
On Fri, May 8, 2009 at 5:58 AM, Patrik Hägne <patrik.hagne at sembo.se> wrote:
Yes, I did read the correspondence from August and that's why I thought it should work. However, I'm glad we've tracked down the actual problem so there is at least a chance that we can come up with a solution.
 
/Patrik
 
Från: Dody Gunawinata [mailto:empirebuilder at gmail.com] 
Skickat: den 8 maj 2009 14:53
Till: Patrik Hägne
Kopia: Discussion of IronPython

Ämne: Re: [IronPython] Iron Python and Asp.net (framework 3.5)
 
I ran your demo and it threw this error
 
"Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.

Source Error:

 
[No relevant source lines]



Source File: InternalXmlHelper.vb    Line: 9 "
 
 
This problem surfaced back in http://lists.ironpython.com/pipermail/users-ironpython.com/2008-August/008036.html then it got fixed, at least for C#. It looks like the VB compatibility issue wasn't fixed.
 
Let's see what Dino thinks of this.
 
Dody G.
On Fri, May 8, 2009 at 3:06 PM, Patrik Hägne <patrik.hagne at sembo.se> wrote:
I'm not sure if this helps but I've included a VB.Net-site that reproduces the problem in the same solution. I'm not sure if you have an environment where you can run it. Also as far as I can tell you do not directly reference the Microsoft.Scripting.ExtensionAttribute.dll in the site project you included but it is present in the bin-folder, I did the same thing for the VB.Net project, it should mirror the c# variant pretty closely but it will fail at runtime.
 
http://cid-8b0c290cf9b30fd9.skydrive.live.com/self.aspx/.Public/IronPythonDemoWithVB.zip
 
/Patrik
 
Från: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] För Dody Gunawinata
Skickat: den 8 maj 2009 13:15

Till: Discussion of IronPython
Ämne: Re: [IronPython] Iron Python and Asp.net (framework 3.5)
 
I don't have VB installed in my VS 2008, so this is what I did.
 
I use this IronPython http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles
 
For each of the project, I reference all the following assemblies:
IronPython.dll
IronPython.Modules.dll
Microsoft.Scripting.Core.dll
Microsoft.Scripting.dll
Microsoft.Scripting.ExtensionAttribute.dll
 
I use the hosting API in a C# WAP using C# only in 3.5 and it worked without a hitch. This is the code https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26
 
I downloaded SharpDevelop 3.0 and use it to write a console application in VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB :)  It worked in console application. Here's the code https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ.
 
 
I can't exactly replicate your problem since I don't have VB on VS 2008. But I hope I help you further along with these two small codes. It seems that IronPython 2.01  works just fine with VB in .Net 3.5 but I'm not sure if the VB ASP.net code provider does something else that make IP 2.01 breaks. 
 
Dody G.
 
 
On Fri, May 8, 2009 at 12:01 PM, Patrik Hägne <patrik.hagne at sembo.se> wrote:
1.       I've tried the current release (2.0.1), the 2.0 release from Dec 10 and even the 1.1.2 version from Aug 8 all with the same result.
2.       We're using the Web Application project model, not the website model.
3.       The language for code behinds is VB.net.
 
Thanks for looking into this, it's greatly appreciated.
 
/Patrik
 
Från: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] För Dody Gunawinata
Skickat: den 8 maj 2009 10:53
Till: Discussion of IronPython
Ämne: Re: [IronPython] Iron Python and Asp.net (framework 3.5)
 
I'll try to reproduce this. I need the following details:
 
What version of IronPython are you using? 
Are you using the website model or the web project model for your asp.net application. 
What language do you use for your code behind, C# or VB or some other code behind language? 
 
Dody G.
On Fri, May 8, 2009 at 9:49 AM, Patrik Hägne <patrik.hagne at sembo.se> wrote:
I have the problem described in the issue http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126 when including an assembly that depends upon the DLR and Iron Python for scripting. I can't get the suggested workaround to work, when I replace the Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the issue-page I get no compilation errors but on the other hand when running the page where the scripting engine is used I get a runtime error saying that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be found.
 
Is there something I'm missing? Might it be that I have to install something into the GAC?
 
Kind Regards

Patrik Hägne
Systems Development
Fel! Inget filnamn angivet.



Drottninggatan 72A
Box 1324, 251 13 HELSINGBORG
E-mail: patrik.hagne at sembo.se Phone:
Fax:
Internet: +46(0)42 37 85 52
+46(0)42 37 85 25
www.sembo.se 

 
 

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



-- 
nomadlife.org

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



-- 
nomadlife.org



-- 
nomadlife.org

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20090508/e85b2e9b/attachment-0001.htm>


More information about the Users mailing list