C# - How To Detect Running Version
Jul 22, 2010How can I see the version of .net framework which renders my aspx page on remote server?
View 4 RepliesHow can I see the version of .net framework which renders my aspx page on remote server?
View 4 RepliesGenerally we should have control of our AppPools and be able to force the Managed Pipeline Mode. In my case I don't have control and would like to implement the code behind code a little differently based on the Managed Pipeline Mode (Integrated vs Classic). I just don't know how to detect this. Is there a simple way to do it from within the code behind page?
View 1 RepliesI created an MVC project in vs2010 RC and i cant really tell if its running on MVC 2 Beta or the freshly released MVC Release. Is there anything i can look out for to determine this?
View 12 RepliesI am trying to roll out a Wordpress site here at [URL] but ran into a snag as the only Wordpress version that it supported was the 3.0.1 not the 3.0.4. What version does Webmatrix install? I have a running site and would rather not rebuild it, can I install this over the top of my existing site?
View 6 RepliesAre the Crystal Reports objects within Visual Studio (I'm using 2005) the full version or is it a trial version that is missing features?
View 1 RepliesWe have an application that is already deployed in the production environment. And currently it is using Dundas evaluation version. We tried updating it to the licensed version by simply pasting the dll file. but we got the error message as "The file has not been pre-compiled and cannot be requested".
View 1 RepliesI'm try to get my site to detect what browser someone is using to ensure they're using one that is compliant with our site. Everything works, except Firefox seems to post the wrong version in the Request.Browser variables.I'm on Firefox 3.6.10, but Request.Browser shows Mozilla 1.9.2.10. It's correct in the HTTP_USER_AGENT string:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 YFF35 Firefox/3.6.10 ( .NET CLR 3.5.30729)
Is there a way to detect it better without having to parse through the HTTP_USER_AGENT string?
Is there any limit on the size/numbers in the version number of the FormsAuthenticationTicket.
I tried to create an ASP.NET cookie using forms authentication, with a large version number(ex: 1234567 need this number for identification purposes). But when I decrypt the cookie I get 135 as the version number.
Initially the old forms authentication cookie was removed, in order to add new information.
Response.Cookies.Remove(FormsAuthentication.FormsCookieName);
Following is the code I used to create the FormsAuthentication cookie.
FormsAuthenticationTicket newAuthTicket = new FormsAuthenticationTicket(1234567, un, DateTime.Now, DateTime.Now.AddHours(5F), false, user_data);
HttpCookie newauthCookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(newAuthTicket));
Response.Cookies.Add(newauthCookie);
After retrieving the cookie, the version number I got was 135. This number varies with different version numbers.
string cookieName = FormsAuthentication.FormsCookieName;
HttpCookie authCookie = Context.Request.Cookies[cookieName];
if (authCookie == null)
{
return;
}
FormsAuthenticationTicket authTkt = null;
authTkt = FormsAuthentication.Decrypt(authCookie.Value);
if (authTkt == null)
{
return;
}
int versionID = authTkt.Version;
Can someone let me know if it's a bad idea to use such big version numbers, or am I missing something in this.
I have Visual Studio 2008 installed on this workstation with SQL 2000, 2005 Express, 2008 Express and I think 2008 R2 (not sure if that is a version itselve or not)
I will call that workstation HOME
I created some tables in SQLEXPRESS through VS2008.
I worked on this project on another workstation that I just installed VS2008 annd SQLEXPRESS 2008 and I know that was R2
Installed Visual Studio 2010 trial edition between the thiem I made the tables on HOME and tonight for the first time since that install
I am now getting the "cannot be opened becuase it is version Version 661. This Server supports version 655..."
What to do now?
I can opened SQLExpress 2008 management studio and it is running.
So is my SQL 2000. The problem seems to be that after the VS2010 install neither VS2008 or VS2010 can connect to the SQLExpress 2008
What do I do now?
I can't remove sql 2000 because it is tied to several 3+ gig databases that will not work in Express.
i am working in webapplication in asp.net using c#.I have a problem that currently i am using ajaxcontroltoolkit version 3.0.20820.0 but in this toolkit i don't have Editor Ajax control so i want to upgrade it with new version ajaxcontroltoolkit version 3.5.40412.2
When i upgrade it then my old ajax control is not working like validatorcalloutextender and requiredfieldvalidator etc.
so please tell me how can i upgrade ajaxcontroltoolkit version from 3.0.20820.0 to version 3.5.40412.2
i also use in web.config file but not successfull.
I have a solution I'm working on in VS2010 Professional, using ASP.NET 4.0 with the AJAX Toolkit.This has been working fine, but when I started it up today, I got the runtime exception shown above. This exception occurs on any page with a control from the toolkit.Sometimes when I load a page, I get an exception "Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, ublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified." If I then reload the page (without making any changes), I then get the exception shown in the subject line.I tried dragging an AJAX Toolkit control from the toolbox onto a page, and then deleting it, and that worked - once. The next time I tried the page (or any other), I got the exception again. Dragging a control out didn't help this time.
View 5 RepliesI am executing a long-running Oracle stored procedure from .NET. The procedure takes about three hours to run. Ideally, the user should be able to kick off the procedure, close the browser, and come back later to check the results.
The problem is that the connection to the Oracle procedure is lost after exactly an hour. As you would expect, the Oracle procedre runs to completion if it is executed from SQL Plus. Strangely enough, it will also run to completion if I run in debug mode on my local machine (I start two threads, one of which executes the procedure. I set a breakpoint on the second thread).
Here is my connection string:
data source= (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=serverx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TestSID)))
Some relevant sections from web.config:
<sessionState mode="InProc" cookieless="false" timeout="3000" stateNetworkTimeout="72000"/>
<httpRuntime executionTimeout="18000" maxRequestLength="2097151" />
Any thoughts as to why the connection is being lost in exactly an hour, and what I can do to maintain the connection until the procedure finishes?
1) I notice that the module gets it's data in chunks. This is problematic for me because I'm using a regex to find and replace. If I get a partial match in one chunk and the rest of the match in the second, it will not work. Is there any way to get the entire response before I do my thing to it? I have seen code where it appends data to a string builder until it uses a matches on an "" end tag but my code must work for more that just (xml, custom tags, etc). I don't know how to detect the End Of Stream or if that is even possible.
View 1 RepliesI am trying to detect wether or not a client has version 4 of the .net framework installed. Using theRequest.Browser.GetClrVersions() method, I only get versions listed up to 3.5 SP1, but I do not get anything back indicating version 4. Does anyone know how I can determine this?
View 5 Replieshow to detect mac address in website?
View 8 RepliesIs it possible to know network card id of the user host computer from where the request is coming like IP address. I am interesting to know if it is possible at IIS or asp.net level or any other possible way of knowing it?
View 2 RepliesWhen <F5> in Internet Explorer is pressed, my page is reset.
How can I detect <F5> press?
I have been developing a quiz application in asp.net mvc. In this quiz user is give a list of topic to take quiz. On click of one of the topic the user is taken to new page. In the get part action of this page i have taken some parameters, generated questions for the quiz, register quiz for the user (save in db)and save the generated questions in db.
Now the problem is:
User see the page, if user hits the "submit" button after selecting the answer than it is ok but If user refresh the page. Then the get action is called again and new set of questions are generated and new quiz is registered to user.
How can i avoid this?
Is there any way to detect that the get action is called the second time or to detect page refresh in as.net mvc.
If you could suggest design changes that it is ok too? i just need to make sure if user refresh the page the question need not be generated again and new quiz should not be registered to user.
I have a sitemappath that I want to surpress on the home page of a website. Assuming the homepage is "www.mysite.com/default.aspx", what is the best way to detect when the base URL is being displayed?
IOW: I can do something like:
if request.servervariables("url") = "/default.aspx" then
sitemappath1.visible=false
end if
but how do I detect when the default url is being used, like:
www.mysite.com
without a page url at the end?
I tried to install MVC2 RC AspNetMVC2_RC_VS2008.exe [URL]? aiming it to use from VS2008SP1(Windows XP Pro SP3) but initially I got an error: Component Microsoft ASP.NET MVC 2 has failed to install with the following error message: "A different version of ASP.NET MVC 2 is already installed on your system. Please uninstall this version before proceeding with this install." The following components were not installed:
- Microsoft ASP.NET MVC 2 - Visual Studio 2008 Tools The following components failed to install:
- Microsoft ASP.NET MVC 2
By my distraction in "Add/Remove Programs" I deleted the entry "Microsoft ASP.NET MVC 2" instead of
"Microsoft ASP.NET MVC 2 - Visual Studio 2008 Tools" (told me by error text) and then succesfully installed
AspNetMVC2_RC_VS2008.exe Now I see entries in "Add/Remove Programs":
- Microsoft ASP.NET MVC 2
- Microsoft ASP.NET MVC 2 - Visual Studio 2008 Tools
- Microsoft ASP.NET MVC 2 - Visual Studio 2010 Tools
Well, it was the same before uninstall/install. I know that only MVC2 Preview can be used with VS 2010 and I gues that I uninstalled MVC2 Beta that was installed before for VS2008. Now I am in doubt: Had I installed MVC2 RC or what do I have with VS2008? How can I determine/check which release of MVC2 is installed with Visual Studio 2008 SP1 (or VS2010 Pro Beta 2)?
we have a situation where we log visits and visitors on page hits and bots are clogging up our database. We can't use captcha or other techniques like that because this is before we even ask for human input, basically we are logging page hits and we would like to only log page hits by humans.
Is there a list of known bot IP out there? Does checking known bot user-agents work?
How do I detect whether a postback is a partial postback from any of my Update Panels?
View 1 RepliesI am working on an asp.net (or winforms) app that is supposed to detect wifi connectivity and strength. The intention is to provide the field agents with an indicator that they can connect to our main office
What would I need to detect wifi connectivity?
What would be the best way to detect if the SessionState has died in order to send the user to a "Session Expired" page? I've successfully configured the app (in Web.config) to do this when the authentication cookie is gone (there's a setting for that), but so far I haven't found an effective way to do something similar when the SessionState is gone. The app in question holds some data in the Session, and should present the user with a "Session Expired - login again" page if any of them is gone.
So far, the only option I can think of doing it in each of the places I access Session, but this is obviously a less than optimal solution.
have a javascript function that fires by clicking any element on the asp.net webpage.When it fires, we have three scenarios:1- full postback (when clicking on a button outside the update panel)2- Partial postback (when clicking on a button inside the update panel)3- No postback (when clicking on a table cell for instance)I was able to detect when a partial postback occurs by using the async property demonstratedbelow, but I could not find a way to differentiate between a full postback and a no
View 5 Replies