ASP.NET
Re: Initialize Scriptvariables
11/16/2008
02:31:41 AM
2IH05F4CX Show this entire thread in new window
From:
bollingp@bluewin.ch
To:
Rick Strahl
Attachments:
None
Rick,

Thank you for your fast response. I can imagine it to be a permission issue but i dont know how to give more permissions to the application because it runs on localhost, not even on IIE, but on the <b>build in</b> server of VS2008 and the connection string in web.config says:

connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True"

Can you explain to me what other permissions i have to twist?

Thanks Peter

Peter,

I suspect this is an issue with permissions of the app. Reflection on any non-public objects doesn't work in medium trust or below...

Can you try setting the app into Full Trust (temporarily) and see if the code works then. I suspect it will...

+++ Rick ---

Hi,
I am working with VS2008 Pro and C# in a server project. Now i try to add the West Wind scriptvariable class, just to become familiar with this library.
The program compiles correct, but throws a runtime error: Invalid index in wwUtilsReflection.cs, GetPropertyInternal(..) in Line
MemberInfo Member = Parent.GetType()...

My ASP code:

protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Session["editStatus"].ToString() == "") { ClientScript.RegisterClientScriptInclude("wwlib", "../scripts/wwscriptlibrary.js"); ClientScript.RegisterClientScriptInclude("nic", "../scripts/nicEdit.js"); Westwind.Web.Controls.ScriptVariables scriptVars = new Westwind.Web.Controls.ScriptVariables(); TextBox1.Text = "Some initial text"; scriptVars.AddDynamicValue("encText", this.TextBox1, "Text");

Can somebody give me an advice?

Tanks Peter