Code Protection System Which Works With IronPython Assemblies?
Feb 24, 2010do you know/have you tried any code protection system which works with IronPython assemblies? Can you list it/them here?
View 1 Repliesdo you know/have you tried any code protection system which works with IronPython assemblies? Can you list it/them here?
View 1 RepliesI need to convert this line of code from an asp.net c# page to asp.net IronPython, how would it be?
((IPostBackEventHandler)Button1).RaisePostBackEvent(null);
When looking at ASP.NET MVC 3 and WebPages (the 'simple' web application framework used by WebMatrix) I noticed that these frameworks take a dependency on assemblies and/or namespaces that do not fit the familiar naming style for ASP.NET:
- Microsoft.Web.Infrastructure
- WebMatrix.Data
- WebMatrix.WebData
- Microsoft.Web.Helpers
Most if not all assemblies/namespaces up until and including ASP.NET 4 and ASP.NET MVC 2 are called *System.Web.** Why did they do it? Is this 'a trap' or is that too cynical? Some context (from the [Mono 2.10 Release Notes][1]):
> Although ASP.NET MVC3 is open source
> and licensed under the terms of the
> MS-PL license, it takes a few
> dependencies on new libraries that are
> not open source nor are they part of
> the Microsoft.NET Framework.
>
> At this point we do not have open
> source implementations of those
> libraries, so we can not ship the full
> ASP.NET MVC3 stack with Mono.
[URL]
when I reference a assembly. It's reference gets added to the project file in my case ( ABC.csproj)
Also when I take a look at the web.config file there is a section called <assemblies>. And lot of assemblies are added there.
What is the difference between link to the assemblies in the Project file and the assemblies in the web.config file?
I have an ASMX Web Service that has its code entirely in a code-behind file, so that the entire contents of the .asmx file is:
<%@ WebService Language="C#" CodeBehind="~/App_Code/AddressValidation.cs" Class="AddressValidation" %>
On my test machine (Windows XP with IIS 5), I set up a virtual directory just for this ASP.NET 2.0 solution and everything works great. All my code is separated nicely and it just works.However, when we deployed this solution to our Windows Server 2003 development environment, we noticed that the code only compiled when all of the code was dropped directly into the .asmx file, meaning that the solution didn't work with code-behind. We can't figure out why this is happening.
One thing that's different about our setup in our development environment is that instead of creating a separate virual directory just for this solution, we dropped it into an existing directory that runs a classic ASP application. So here we have a folder with an ASP.NET 2.0 application within a directory that contains a classic ASP application. Granted, everything in the ASP.NET 2.0 application works if all of the code is within the .asmx file and not in code-behind, but we'd really like to know why it's not recognizing the code-behind files and compiling it correctly.
I have this code up in a live windows 2003 sp2 server. I use Hmailserver as mail server and I am not sure if this cause the problem.I am able to send email consecutively 2 time no problem, but it is always the 3rd time after I would get this error: Unable to read data from the transport connection: net_io_connectionclosed. I wait for 30 minutes I am to send email again, but only the first 2 time works. Here is my code can someone please verify my code and see if anything is wrong with it.
View 3 RepliesIs there any way to make application works on same system where it is deployed and will not works if any one copies application and database and deployed to other system, how to prevent that.
View 1 RepliesI created a web form to send emails and using a class to perform the task. The process works well for all internal email addresses but will not deliver to external email addresses. I am not sure if I missed something in the code to send to external address.
[Code]....
I wanted to disable a button after it is clicked and at the same time fire the post back event to generate a report. My first set of code did not work because soon after the button is disabled the page won't submit/post back. here's the first set of code which was not implemented. the onclientclick calls a javascript function which has these lines
document.getElementById('btnGenerateReport').disabled=true;
GetPostBackEventReference(btnGenerateReport,'');
since it was not posting back,i tried the following on page_load code behind
btnGenerateReport.Attributes.Add("onclick", "this.disabled=true;" + ClientScript.GetPostBackEventReference(btnGenerateReport, ""))
that worked well. but I tried to copy the javascript that got generated and pasted directly on design view
onclick="this.disabled=true;__doPostBack('btnDownloadClientsWithConviction','');"
its not working from client side alone after I disable the code behind attributes.add
but when I check the view source the 2 pages are the samewhy am I not able to move the code from code-behind to design view?
I searched the web and stackoverflow, but unfortunately, have not found any definite answers on whether or not Django is properly supported in IronPython.Net.
At work, I have some tools I would to develop in Django and Python, but from what I have read, Django is not really supported in IronPython.Net.
I am very interesting in the dynamic language runtime of .net, and saw IronRuby/IronPython is built on top of it. I cannot find some example which utilize the dynamic of Ruby/Python from within c#, which is what I realy interested.
I saw videos from Microsoft which call JavaScript from within Silverlight using the dynamic of c# 4, just wondering how easy it is to call Ruby/Python in web/windows form? I know that Umbraco have a python implementation somewhere, and it is possible, but not sure how?
I want to select a particular item in a dropdownlist by value, in asp.net using IronPython.
I found I can do it like this
listItem = ddl.Items.FindByValue(x)
if listItem != None: listItem.Selected = True
But I want to do it in one line
I'm trying to get a CodeExpression from a string of python. It seems possible since some of the DLR docs mention CodeDom classes but I haven't been able to find any examples or better docs. Any insight or psuedocode appreciated...
FYI, the use case here is to make an Asp.Net ExpressionBuilder that can evaluate python to use in SharePoint 2010. Let me know if there's anything like this out there!
Please look at this method that looks intuitive but not working, I want to use a one parameter search method when search word is not empty and the parameterless method when it is empty I wrote these two methods that are not working because select parameter doesn't added or removed in the selecting method:
[Code]....
[Code]....
[Code]....
why this code works but the previous one not? I'm very disappointed to see this because based on what I learned the first one could also work.
When we reference a DLL. It creates that DLL in the BIN folder of our project.My question is although the BIN folders are not included in the web application project thenhow come all the code works? When I right click on the Bin folder I get an option "Include in Project"So how come I am able to use all the methods inside the dll's in the BIN folder even though the BIN folder itself is not included in the Project? Do we ever include the BIN folders?
View 10 RepliesI have .net code that works on IE8 but wont work on google chrome or firefox. i have put this code for the user to press Enter instead of clicking the mouse everytime.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
If Not IsPostBack Then
[code]...
I'm trying to call ReportViewer.ServerReport.Render similar to what we did in VB.NET or C# this way,
exportBytes = ReportViewer1.ServerReport.Render("PDF",None,mimeType,encoding,fileNameExtension,streamids,
Warning)
But I'm getting this error "expected Reference,but found null"
I am having some trouble with an ASP.NET website I've set up and it's very difficult to debug.Background Information:There is a page on my website that allows the user to upload one or many Microsoft Word documents. The user can then press a button, and the code is supposed to open the document(s), count the words, and then return the number of words in a table.This works perfectly fine when I am in Visual Studio running the debugger, however when I try to do it over the web from another computer, I get an error.
try
{
String file = this.lstFileBox.Items[i].Text;
// MicrosoftWordOperations is a custom class
MicrosoftWordOperations wordOps = new MicrosoftWordOperations(file);
String contents = wordOps.GetContents();
int numWords = wordOps.CountWords(contents);
[code]...
I'm working on web pages that have an ASP DropDownList defined, and on page load the data source is bound to it through DataSource.DataBind(). When I step through the code, the drop down list does not show anything in it, but when the page actually displays, it does have items in the list. When exactly does DataBind() get applied to the control?
The problem is that some of the values returned by the SQL back end have a null Text, so nothing is displayed in the drop down list for that row. I want to just use the Value as the Text, but only if the Text is null. And when I put the code to loop through and do that right after the DataBind(), there is nothing in the drop down list at that point in the code.
I have ran into an issue that has me stumped. I have a jquery / javascript function that loads when my site is loaded. It calls a service in my project and returns a string of data.
[Code]....
The code that handles the web method is shown here:
[Code]....
This is something I have done similar multiple times. The problem however is the code works fine on the local devbox how ever when I move the project code to the prod box I get a response back with the following:
[Code]....
One note this is the first time I have done this targeting .Net 4.0. Is there an issue with relative url's using .Net 4.0, or VS 2010 that I have missed?
Not sure which category to put this question in, so I will put it in here. Just to give you an idea of the layout of my solution, I have the main project, along with 2 class libraries, BLL and DAL. (Business Logic Layer and Data Access Layer) The BLL refers to the DAL and the main project refers to the BLL. I had a test website and the code worked fine, but the same code will not work on the real project. The only difference is that in the test project, the code was on an aspx code behind, whereas in the real project, it is an ascx code behind (Web User Control
)
The code is:
[Code]....
Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString
Imports System.Collections.ObjectModel Imports System.Management.Automation
Imports System.Management.Automation.Runspaces Imports System.Text
Imports System.IO
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
If DropDownList1.Text = "ABCD" Then
Label1.Text = " ServerB" End If
[code]....
I have an ASP.NET site I built for our users to map a network printer. When I test it, it maps the printer without any probelms. When I publish it to IIS, it acts like it's going to run, but never tries to map it. I have checked all the permissions, I have tried it as a web app and a web site, I have tried to publish both and I have tried to copy and paste the folders in the root folder. I have added references to the Microsoft.Powershell.XXXX. I have changed it from "CodeBehind" to "CodeFile" and I have changed the "AutoEventWireup" to "true". There are no errors in the event log and none on screen. It clears the fields, like it should at the end of the code and that's it.
when I compile some .py codefiles with no class definitions into dlls , the compiled dll is created with a "DRLCachedCode" class inside. Why is that?
View 1 RepliesI have a problem when viewing my website in Internet Explorer.
When I use any other browser my Gridview works fine but in IE it triggers my VB code twice per click.
So here is the code
[code]....
I am only using the msgbox as a test to see if my issue is resolved. I know not to use this outside of visual studio.
When I use the above in Internet Explorer it fires twice! but in every other browser I have tried it only fires once as expected.
This code worked until I published a recent set of changes to the web site. It's very strange behavior that I am having trouble debugging. Basically, I implemented some custom code to allow custom configuration of login timeouts from an app settings variable.
When debugging the application, if I click remember me or not, Login works perfectly. Once I post the updated code to the live server, login only works if I have the Remember Me option unchecked. If I check remember me, it does not log in, and it cycles the user back to the default web page. If I access the site from IE on the live server, remember me works correctly.
Here is the Logged_In event handler code:
[Code]....
[Code]....