Configuration :: HttpBrowserCapabilities Returning Wrong Information?

Nov 30, 2010

I have been struggling with this for days now. Most of my clients run IE 8, but I got issues with two of them. In my app I use the Majorversion to enable some controls on the webfrom. However, at these two clients the majorversion returned is 7 instead of 8.

I have disabled the compatibility mode of IE 8 so it runs in IE 8 mode. Furthermore, I addes an app_browser folder to my application and putted in a ie.browser file with the correct information. This doesn't solve the problem however. It still returns IE 7 as browser instead of IE 8.

The UA-string however is correct. when I visit a testsite with this same browser on the same workstation, I get the correct browser values. So it is a local thing. I still don't understand why the file in the app_browser folder is not working.

I just created this folder on the already existing application folder and putted the browser file in it. That should be enough. Isn't it? My application is a compile webapplication.

View 2 Replies


Similar Messages:

C# - GetUtcOffset Returning Wrong Timezone?

May 13, 2010

for some reason when I use the following code

TimeSpan timeDiffUtcServer = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);

it returns -07:00:00 offset

I am using Windows XP and my timezone is set to Pacific time -08:00. I am running this through VS 2010's built in IIS server which is on my computer, so I can't figure out why the discrepancy in time.

View 1 Replies

Web Forms :: How To Stop The Browser From Remembering The Wrong Information

Mar 8, 2010

I have a page with some controls and a next button. When the entered information does not match the database values, an error message is displayed.

After seeing the error message, the user enters correct data and clicks next. The code behind the next button makes the error message empty and invisible and goes

to the next page. On the next page the user clicks the browser's back button. The previous page is displayed with the valid data and the error message showing.

I had expected the error message not to be displayed.

View 2 Replies

State Management :: Data Being Saved To Wrong Table In Wrong Instance Of Sqlserver Of Wrong Database?

Aug 1, 2010

I have a weird thing happening. I have two identical databases installed on one virtual machine but under two different instances of SQLServer. For some reason, periodically when saving from one it will save to the other instead. Using debug, I have verified that the connection string is correct and when the item saves, it still saves to the wrong database.I use session variable, and am of the belief that it might have something to do with it...and t hat when I go from one to the other it is still getting the connection string form the other for some reason.To make sure that it isn't a problem, I make sure that I completely close out one database before opening the other in a new IE window.I assume that when I completely close out an internet explorer window that it abandons all session states. Is that true?

View 7 Replies

Returning Specific Information From External Websites With VB.net

Mar 9, 2011

I have experimented with coding such as follows:

Imports System.Net
Imports System.IO
Imports System.Data
Partial Class Test01
Inherits System.Web.UI.Page
Dim T01String As String
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim WRequest As WebRequest = WebRequest.Create([URL])
Dim WResponse As WebResponse = WRequest.GetResponse()
Dim WStream As Stream = WResponse.GetResponseStream()
Dim WStreamReader As New StreamReader(WStream, Encoding.UTF8)
T01Location = WStreamReader.ReadToEnd()
WResponse.Close()
WStreamReader.Close()
End Sub
End Class


In this example, a stream of data is captured from the Wikipedia website. I am looking for resources/options to assist in (a) returning specific information from a website based on criterion to be stated in the code (rather than the entire unformatted HTML data, for example), and (b) providing a variable value for an entry required for a particular website, then returning the stream based on the result (example: allowing the entry of an address as a variable value and then returning the zip code from the USPS website). Basically, the idea is to find the correct code configuration for allowing "wildcards" when returning a stream of data from a specific website.

View 5 Replies

Configuration :: Deployed DLL Contains Wrong Paths?

Sep 30, 2010

This may be a dumb question, but I've got a DLL that I compile and reference locally in a web site project and everything runs just fine. When I deploy this solution to the test server, I get an "Object reference not set to an instance of an object." error and the stack trace displays the files with their paths that are causing the error. The thing is, the paths being displayed are the absolute path as they existed on my development machine. Here's the stack trace:.........................

View 3 Replies

ADO.NET :: Data Saving To Wrong Database On Wrong Instance Of Sqlserver

Aug 1, 2010

I have a very weird thing happening. I have two databases that have exactly the same tables but different database names on the same virtual machine, but in different instances of SQL Server. For some reason, when using one of them, it will save to the other. In debug, looking at my connection string..I have verified that it is correct, yet when I allow the save, I look in the table and it isn't there, it is in the other database that is in a table with a completely different name and in a different instance of SQL Server.

View 1 Replies

IIS Configuration :: Returning Old Version Of Constantly Changing File?

Dec 29, 2012

I have hosted a website in the iis and when i replace the file it is not updating the file it is showing the old version.

View 1 Replies

Web Forms :: Configuration Manager - Connection String Is Returning Null

May 7, 2015

[URL] .....

I have an error with this tutorial.

Line 13:
Line 14: Private Sub BindGrid()
Line 15: Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
Line 16: Using con As New SqlConnection(constr)
Line 17: Using cmd As New SqlCommand("Customers_CRUD")

Imports System.Data
Imports System.Configuration
Imports System.Data.SqlClient
Public Class tessatusatu
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

[Code] ......

View 1 Replies

Configuration :: CustomError Needs Additional Information

Sep 14, 2010

Using VB.Net 3.5 framework, i have a site that is using a custom login form and custom error with custom error page in global.asax and web.config is set up for both the login form and custom error. All works fine: my users login and when they get an error, they get the custom error page. The pages also use querystrings when moving about the site in order to retrieve data from a data base using a customer name (this is not the login name) and order number. When an error occurs anywhere in the site, I'd like to pass the page name and its querystring parameters

(ex: page1.aspx?a=1&b=2) to the custom error as well as the user information so that all the user sees is the custom error page telling them the error and all details were sent to the admin. Currently, the custom error page has an email link so the user can send a message that includes the details which results in 2 emails being generated for an error: one from global.asax with the error info/stack trace and the one the user sends with the details.

In my mind, a graceful failure does not require input from the user, just an apology and assurance the problem has been fully reported and will be taken care of. So, can someone assist in getting the current user and page/querystring into the custom error code in global.asax?

View 3 Replies

Impersonation + Error Reading Configuration Information From The Registry?

Jul 6, 2010

have registered keys in the registry for impersonation for my application (asp.net 2.0 running in IIS 7.0)

<identity impersonate="true" userName="registry:HKLMSOFTWAREMY_SECURE_APPAPPNAMEASPNET_SETREG,userName" password="registry:HKLMSOFTWAREMY_SECURE_APPAPPNAMEASPNET_SETREG,password" />

View 8 Replies

Configuration :: Show Web Applications Build Version Information?

Jan 20, 2010

I would like to make the build information for the running web application but I dont know where I set or configure this nor do I know how to retrieve this information.

In a project you may set the build information in the file AssemblyInfo.cs under the projects Properties folder. Here is a snippet of the AssemblyInfo.cs file:

[Code]....

But there is no such file for an web application project, so I have to get this information from one of the compiled DLLs that is in the same assembly as my web application then? Or how is this done?

The reason I want this information is because my customer would like to have a webpage within the web application where he could see the current version. This is also nice to have when testing and debugging etc.

View 5 Replies

C# - Is Returning List<T> From Method Differ In Performance From Returning Collection<T>?

Jul 18, 2010

We have a web project that contain its business methods in a class library project called "Bll.dll"
some methods of Bll.dll return List<> ... from a source - that i don't remember now - told that returning Collection<> is better than returning List<> Is it a valid ? Note that i don't make any process on values returned from BLL methods .. just view it in a web page

View 5 Replies

Configuration :: Using Class To Pull Active Directory Information For Forms

Aug 17, 2010

[Code]....

Using class to pull Active Directory Information for forms

View 2 Replies

Configuration - Multiple SMTP Servers Or Update The SMTP Object Server Information At Runtime?

Nov 5, 2010

The question: Is it possible to configure multiple SMTP servers or update the SMTP object server information at runtime?

Description of problem: The site I'm working on has a few pages which send emails. Our site is using Gmail so even though it's a custom domain our email is sent out though Gmail SMTP servers.

Some emails come from the system and some emails come from users in certain groups. I have an SMTP server configured with the admin email for the system e.g. admin@mysite.com This works fine and when I get the email it shows from admin@mysite.comOne of our user groups let's call it "groupA" has an email configured on our domain i.e. groupA@mysite.com When I send the email and specify a from address for the MailMessage object as groupA@mysite.com it still shows up in my outlook as coming from admin@mysite.com I did a little further testing and if I specify both the from address and the ReplyTo as groupA@mysite.com it will show as From=admin@mysite.com but when I choose reply in outlook it shows groupA@mysite.com My best guess is that Gmail is overwriting the From address with the SMTP user to prevent email spoofing.

I found this: http://www.systemnetmail.com/faq/4.1.aspx but it won't work for me since group A, B, and C all need to send emails from the same page.

View 1 Replies

ADO.NET :: Automatically Loading Information From A MS SQL DB When Information Is Entered

Jan 19, 2011

I am making an online form (literal form) that needs to have a certain function: when the user enters a 5-digit number, the form should automatically query the MS SQL DB and retrieve information associated to that number and populate other form elements (text boxes, etc.) accordingly.

So say the # was 12345 and in the DB, the record matching 12345 has name=Fred. So, when I enter 12345 into the form textbox, the name text box should be automatically populated with Fred in it.

If this is not easily achievable, I guess a submit button beside the 5-digit number text box can do.

I am still learning my way around ASP.NET and Visual Studio 2005, however I have ample experience with HTML, CSS, JavaScript, C/C++. The ASP.NET app is to be written in C#.

View 1 Replies

MVC :: Url Becomes Wrong When Using Id On Action?

Jan 12, 2010

I have the following in my JQuery code:

icon.image = "../Contents/Image/GoogleMapMarker_Icon.png";

This works fine when I am on the url:

http://localhost:65125/Center

But if I pass an Id to the action and get the following url:

http://localhost:65125/Center/3

The image is not loaded and I get a 404 error. I was checking with with Firebug and I get:

http://localhost:65125/Center/Index/Contents/Image/Marker_Icon.png

Instead of:

http://localhost:65125/Contents/Image/Marker_Icon.png

View 7 Replies

Wrong Firstdayofweek Set In VB.NET?

Feb 23, 2011

I am working on I am getting the wrong week day for the current day i.e today

Response.Write(WeekdayName(Weekday(System.DateTime.Now)))

I am getting Thursday, where does this default get set or where can I change it. And it thinks day of the week is 4.

View 2 Replies

What's Wrong With This SQL Server Query

Jan 15, 2011

What's wrong this T-SQL query :

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SQLData As New System.Data.SqlClient.SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True")

[code]...

View 3 Replies

WCF And Json / Wrong Serialization

Feb 2, 2010

Why this WCF 3.5 method

[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Json
{
[OperationContract]
[WebGet(ResponseFormat = WebMessageFormat.Json)]
public string Upper(string text)
{
return text.ToUpper();
}
}

returns {"d":"TEXT"} ?
It should returns {"TEXT"}
I'm calling using jQuery.
$("#upper").click(function() {
$.ajax({
type: "GET",
url: "/Json.svc/Upper?text="+$("#input1").val(),
success: function(data) {
$("#input1").val(data.d);
}
});
});

View 2 Replies

Wrong Login Used When Using NHibernate For ORM

Feb 12, 2010

I have an ASP.NET v2 website which uses NHibernate for ORM. My current architecture is not that great and I will be changing it after reading some best practices but I wish to still try and figure out my current problem. I have a login screen which creates a ISessionFactory with the connection string set appropriately to the user name and password entered. The SessionFactory is then stored in HttpRuntime.Cache (all objects stored in the HttpRuntime.Cache have an expiration of 30 minutes which is not ideal and may cause issues but hopefully is not relevant to this particular case).

Whenever a data query is made the application tries to retrieve a Session from HttpContext.Current. The first time this occurs no Session is present so one is created from the SessionFactory and stored for future reference. The same Session is therefore is used throughtout the application which is not ideal I believe and it is not explicity closed after each operation. There have been various issues with the application including timeouts which may be associated with not closing connections after each operation. An error that has recently appeared is:

Message: Login failed for user 'myusername'.
Type: System.Data.SqlClient.SqlException
Source: .Net SqlClient Data Provider
Stack Trace: at
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)

This is only after a few minutes of using the application so should not be related to the use of HttpRuntime.Cache. The username in the exception (myusername) does not match the user specified in the connection string! Does anyone have any idea of what could cause this. I was thinking of ConnectionPooling but understand that the connection is made from a pool keyed on user name and password so it shouldn't confuse users. I am changing the application to use an IHttpModule to create a session per request which will be explicity closed after each operation but I would still like to know what causes the current problem.

View 1 Replies

C# - What Is Wrong With This File Path

Jan 7, 2010

I have two folders called CSVLoad and Forms... I have an aspx page inside forms folder which has a fileupload control. I save my uploaded file to my CSVLoad folder i gave the following path

FileUpload1.SaveAs(Server.MapPath("CSVLoad//" + FileUpload1.FileName));
I am receiving file not found exception.
Could not find a part of the path
'F:WebSitesPayrollFormsCSVLoadEmployeesdata.csv'
CSVLoad folder is outside Forms folder (ie) both are root level folders of my application

Answer :

FileUpload1.SaveAs(Server.MapPath("~/CSVLoad//" + FileUpload1.FileName));[URL]

View 1 Replies

ADO.NET :: Update SQL Statement Wrong?

Aug 26, 2010

im trying this query but i get a error at the very end of the statement at [BookingNumber] ---- The error IS: Incorect Syntax near [BookingNumber]

"UPDATE ["+txtDBNameSql+"].[dbo].[Bookings] SET [ItemPrice]="+Price+",[ItemCode]="+Code+",[Status]="+Status+",[Clientescription]="+ClientDesc+",[ArrivalDate]="+arrival.ToShortDateString()+",[DepartureDate]="+depature.ToShortDateString()+",[DurationCharged]="+Nights+",[ClientCode]="+clientCode+"
WHERE [BookingNumber]="+WebBookingNo+""

View 2 Replies

Getting The Wrong Client IP Address?

Apr 10, 2010

I am running an ASP.NET application. The web server is located on the same system. In the code behind I just want to get the IP address of the requesting client. I am using this code:

Request.UserHostAddress

But I am getting a wrong address: 127.0.0.1. My system IP address is 198.162.0.27.

View 1 Replies

Configuration :: Configuration Error / Unrecognized Configuration Section System.serviceModel?

Mar 10, 2010

I am getting this error on a website. does that mean the server is not competible with asp.net 3.5

Configuration Error
Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized configuration section system.serviceModel.

Source Error: [Code]....

Line 236: </assemblyBinding>Line 237: </runtime>Line 238: <system.serviceModel>Line 239: <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />Line 240: </system.serviceModel>

Source File: D:Inetpubvhostsmuratmalli.comhttpdocsweb.config Line:
238

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved