I have a web application in where in my default page cs file i didn"t write anything
and i have created an msi using set up and deployment provided by VS 2005 and installed that msi in other machine and when im trying access it thru url im getting the below error....
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Requested registry access is not allowed.
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.
There is no solution. Change your design. Why ASP.NET application requires registry access? Usually hosting providers will not give access to registry. If you have a dedicated server, you can impersonate the user before accessing registry. But it is nasty.
The below is my web.config... please have a look
Actually the below is web.config for AJAX ENabled ASP.net web application
It"s a plain application ie no code wa written in cs file...
Really im struggling frm 2 days please try to help me out...
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
<trust level="Full" originUrl="" processRequestInApplicationTrust="false"/>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<authenticationService enabled="true" requireSSL = "true|false"/>
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. -->
<scriptResourceHandler enableCompression="true" enableCaching="true" />
In windows 2003 server in IIs 6.0 when i tried to change the process account of the application pool to Local System through script(because i should not change manually and that(changing process account) should happen when installing MSI itself) it worked fine ie in IIS 6.0 but im strugling how should i change process acount to Local system in IIS 5.0 thru script....
Any way changing process account to Local System is not safe but i cannot
manually go to registry and add the ASPNET account and give read and write access....
And in IIS 5.0 ie in Windows Xp pro if i set Permissions for
HKLM\SYSTEM\CurrentControlSet\Control\Lsa Select this key and add ASPNET machine account with read and write permissions then im able to clear error Where LSA(local Security Authority)...
Hi all I want to create a very generic search control which i can use it on any page.so as to search the data from the table provided by user,list of columns and the sql will be dynamically created depending on textbox id and there respective values.
Please Suggest how do i create a server control so that i can use it on any page which will be either return dynamic sql or datasource for binding with gridview.
protected void Button1_Click(object sender, EventArgs e)
SqlConnection sconn = new SqlConnection();
sconn.ConnectionString = conn;
ArrayList ar = new ArrayList();
ArrayList ar1 = new ArrayList();
foreach (Control c in Panel1.Controls)
Type t = c.GetType();
string name = t.Name;
TextBox t1 = null;
id = c.ClientID;
t1 = (TextBox)c;
value = t1.Text;
value = "%";
bool lbHasWhere = false;
StringBuilder loBuffer = new StringBuilder();
loBuffer.Append("Select '"+columns+"' From '" + tablename+ "'");
for (int k = 0; k < ar.Count; k++)
loBuffer.Append(" And ");
loBuffer.Append(" Where ");
lbHasWhere = true;
loBuffer.Append("" + ar[k] + " like '" + ar1[k] + "'");
I have an click once application. The prerequisites which i have mentioned is .net Framework 2.0. If the prerequisite is not there, in publish.html, i get a button to download it, else the Run button will install the application (which is developed by me) . This works fine in all the machines, except for one in which i have the following versions of .NET Framework,
.NET Framework 3.0 Service Pack 2 3.2.30729
.NET Framework 3.5 SP1 3.5.30729
.NET Framework 2.0 Service Pack 2 2.2.30729
In this machine even though we have Framework 2.0 and higher versions, i am getting the button to download Framework. This is not correct. Can any one help me on how to overcome this problem.
the problem that in href link i must make a POST to the page not a GET. th problem that for style reason i must keep the <li><a></a></li> to keep the style in the page.
is that possible, is there any trick to do it?
thanks you for help!
i am using ASP.NET WITH C# FOR my website.
I have an ONLINE table which stores the id of the user who signin to the site.
Now i want to delete the id of the user from the ONLINE table who signout by using SIGNOUT button or close my website from browser.
behind the SIGNOUT button, i have applied simple sql delete query which works properly but in case of closing browser i have tried the GLOBAL.asax event
APPLICATION_END() ... which contains the same delete query... but it doesnt workssss.. can anyone tell me why its not working ??
do we have to make any settings in webconfig filee??
but as i have put the same delete query in the Session_End() event of global.asax... after 24-25mins of closing the browser it hits and delete the id from the table... i dont want such a great delay...!
please guide if i am missing any imp point in my implementation!
You have mis-understood what Application_End is for. It is not for when a user closes the window, but instead is fired when ASP .NET is actually shutting down the web application. You can get lower timeouts by adjusting the session timeout in web.config.
well this is the solution for signout button only,
my major problem is with BROWSER closing event... i have to delete user's id from ONLINE table at this event.
My website is about chatting.... thats why this user's online/offline state is very important to manage... i cant let user's status remain be online if he/she has closed the application from browser...
This is asked frequently. No events are fired on the server when user closes the browser window. You can follow any of the following suggestions.
1 - Hook a JS method for the browser close event, do AJAX call which delets the record from database. This is less reliable as JS can be turned off from the client.
2 - Keep users last request time in the table. Run a SQL scheduler job which scans this table frequently and if the current time minus last active time is more than the session timeout limit, delete the record. I suggest this method as this is more reliable than the first one.