|
Hi, I would like to redirect all http requests made to mysite.com ... to www.mysite.com instead ... what is the easiest way to do this?
Can I configure DNS to do this somehow? Do I configure something in IIS? Do I use some sort of URL rewriting in ASP.NET? Do I create two web sites (mysite.com and www.mysite.com) and redirect from one to the other?
I just don't want http://mysite.com to ever appear in the address bar, I just want http://www.mysite.com instead (so visitor bookmarks and the server log file isn't mixed up with both versions -- which are the same site).
Any ideas as to what is the easiest, most compatible method of accomplishing this?
My platform is Windows Server 2003, IIS6, ASP.NET, NET 2.0, C#, etc...
Thanks for any assistance!
|
|
|
|
|
|
Thanks for the ISAPI_Rewrite suggestion. Works great. Voted you a 5.
|
|
|
|
|
Hello,
I have upgraded all of my VS 2003 built xsd files to VS 2005. For some reason I just can’t compile the upgraded version of the project (in VS 2005) because of the exceptions (blue lines) I get in few of the “.xsd” files in the VS 2005 IDE. Error: I see blue lines under the below lines in my few of my DataSets System.ComponentModel.DesignerCategoryAttributeSystem.ComponentModel.ToolboxItemSystem.ComponentModel.CollectionChangeEventHandler<system.componentmodel.browsable(false), _="" system.componentmodel.designerserializationvisibilityattribute(system.componentmodel.designerserializationvisibility.content)=""> _
When I mouse hover under the first one line of code it says “ ‘DesignerCategoryAttribute’ is ambiguous in the name space ‘System.ComponentModel’”
On the second line I get “ ‘ToolBoxItemAttribute’ is ambiguous in the name space ‘System.ComponentModel’” On the third line On the second line I get “ ‘CollectionChangeEventHandler’ is ambiguous in the name space ‘System.ComponentModel’” And on the fourth line I get “ ‘Browsable’ is ambiguous in the name space ‘System.ComponentModel’”
And so on… But just to give you note I don't see the same thing happerning for all of the .xsd file but for just few of them.
I tried to compare both of these files to see if there is any difference in them but couldn't notice any thing different.
Am I missing some thing in here? Do I have to reference any dlls in the VS 2005? If it was the case why few of the .xsd files are smiply fine?
Any help is greatly appreciated.
Thanks,
-L
|
|
|
|
|
I've been playing with Silverlight, and so far - and given it's only a beta product - I'm quite impressed with what it seems to offer. Important to me are: single language support on both client and server and a far improved design and layout system.
However, i'm tempering this with the fact that there are an awful lot of MS *evangelists* promoting Silverlight, so I thought I'd ask you guys what you think, specifically:
Do you think that Silverlight can (and will) replace the current html/css/javascript triumvirate that dominates the web? I can see why designers and developers would want this, but given that Flash never managed it, is it likely that Silverlight will?
|
|
|
|
|
Good question. I've got the same first impressions.
I think that it will be a success because today the layout possibilities and user interaction is very limited. Users will demand this.
And it will be a greater success than Flash because it builds upon .Net that ives a lot of programmers better access than Flash (my opinion).
Finally, I hope that we can build applications that run in every browser in the same way with the exactly same layout and that it will not be built on limited HTML, css or JavaScript
Wait and see
Urs
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Hi
I am tryin to build a web front end which will speak to a mysql database in the background
I have decided to help with performance and maintainibility i am going to try and use stored procedures to extract data from database so i don't need to put all the sql through the script.
I am not sure if i am going in the right direction with this as i am a newbie at this game. I have produced the following function which i believe is correct.
Private Function spTest() As DataSet
Dim connectionString As String
'create connection to databases passes strings into mySql login
connectionString = _
"server=localhost; uid=*****; pwd=*******; " + _
"database=test"
'Sql command string, can enter stored procedure call here
Dim connection As New MySql.Data.MySqlClient.MySqlConnection(connectionString)
connection.Open()
Dim command As New MySql.Data.MySqlClient.MySqlCommand
command.Connection = connection
command.CommandText = "test"
command.CommandType = CommandType.StoredProcedure
Dim daAdaptor As New MySqlDataAdapter
daAdaptor.SelectCommand = command
daAdaptor.TableMappings.Add("id", "firstname")
Dim dataset As New DataSet
Dim table As DataTable = New DataTable
daAdaptor.Fill(dataset)
Return dataset
End Function
my stored procedure is just a simple select statement which extracts the id and name fields in my database
i want to be able to display my results in a datatable in the web browser.
has anyone get any hints in where i should go from here?
I am guessin i now need to build the page_load method and get it to call this function and pass the dataset variable into a table display method?
any help appreciated
boyindie
|
|
|
|
|
You're on the right track, keep going.
only two letters away from being an asset
|
|
|
|
|
|
ass [et]
only two letters away from being an asset
|
|
|
|
|
if thats an attempt at a joke its reallty quite pathetic
|
|
|
|
|
I'm trying to assign a data value in a gridview template during the databind operation. I've replaced the Bind("column_name") with a custom function. In that function, I want to take one of the values from the datatable's rowset (a vendor number) and lookup the name for that vendor returning that as a string. The following code is what I am trying to accomplish.
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# GetVendName() %</asp:Label>
</ItemTemplate>
I want GetVendName() to obtain the vendor number from the datatable and do a lookup returning the name of the associated vendor.
How can I reference the current VendorNumber column from the datatable object of the GridView during the "DataBind()" process in GetVendName()??
Thanks
|
|
|
|
|
First of all.... you're going to want to close your tag there... it should say <ASP:Label ID="Label4" runat="server" Text='<%# GetVendName() %>'></asp:Label>
And.... why not just select the vendor name to begin with? Why go through the extra step of converting a vendor number?
|
|
|
|
|
The closing tag is probably just an error when copying and editing the code in my post. The vendor name is coming from a different database so I can't include the name in the select statement.
Excellent question though!
|
|
|
|
|
Hampden Tech wrote: The vendor name is coming from a different database so I can't include the name in the select statement.
If you have a data access layer that provides the resultsets appropriate for the presentation layer you won't have this problem.
only two letters away from being an asset
|
|
|
|
|
I'm creating a web app using ASP.NET and AJAX. It was working fine till last week. Without anything obviously changed, it began loosing HttpContext between the "PageLoad" and Page Events of a dynamically added User Control. The main ASPX page has a placeholder to load the dynamic control. To avoid "View State Tree" errors, I add the pre PostBack User Control back into the placeholder in the "OnInit" event of the ASPX page, then remove it and add the new User Control in the "PageLoad" event. The code goes to the "PageLoad" event of the newly added User Control (uc1) (all is fine here), then it goes to the "PageLoad" of a User Control inside this first user control (uc2) (all is still fine here). Then the code goes back to whatever Event that was fired on uc1 (it is here where HttpContext is lost). Mind you that this setup was working fine since it's inception about one month ago. I have been tinkering with it all along and have not made any app-wide changes (to my recollection) that could create this effect. Anybody ever come accross this problem.
any help will be greatly appreciated.
Fausto
|
|
|
|
|
Hi,
I have a button field in GridView. It shows the ID. When I click on it should grab the id and open new ASpx page based on that ID.
How can I do that.
Thanks in advance
seema
|
|
|
|
|
You got to assign a property called command name!
So assign a command name to your button and write your logic accrdingly in the ItemCommand event!
if(e.commandname=="name")
.....
....
.....
Gautham
|
|
|
|
|
while click the button you have to fire an event (you can call edit,delete ... command). In that function you can get the selected rows and you can process what ever you want.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
In my web page, I have a TreeView control. It databinds the image property on every node, however, the images I have are all different sizes, and I need them all to display 64x64 on the page.
Is there anything I can do short of manually resizing them with photoshop? I'd do that... but I don't have the time.
|
|
|
|
|
Hello Friends,
I am in a search of some information over asp.net. I have created a web application which my client requires to set in on a server which is phisically present in the company premises itself. The condition of the client is such that when the users are using the application in the same premise they should not be routed through internet, so the bandwith could be saved. Over there they should use LAN for processing the application. But for the user who is accessing the website through internet should hit the same server and application. So in short they need that the application should have two pointers.
I have tried giving it two pointers, the application is getting accessed through internet, user can login sucessfully but as the any activity is clicked it displays "Page Cannot be displayed" the reason is it is searching for internal server files through URL.
Eg...
My test application is deployed by name http://testsoft/login.aspx
My live application which has a public ip is by name http://255.26.235.22/login.aspx
When user logs in a web application internaly and clicks on any activity through LAN the application redirects the pages through the url http://testsoft/myactivity.aspx
But when user logs in a web application externally it should display ip http://255.26.235.22/myactivity.aspx but instead of that its getting redirected to http://testsoft/myactivity.aspx which is basically for internal users. So external users are not getting access through the activities of the application and the result which gets displayed is "Page cannot be displayed".
Is there any solution related to global.asax file ? If any kindly let me know.
Please reply ASAP,
Nikhil Bandekar
Mumbai,
India
|
|
|
|
|
Hey Nithil,
Nikhil Bandekar wrote: My test application is deployed by name http://testsoft/login.aspx
My live application which has a public ip is by name http://255.26.235.22/login.aspx
The above code shows that you are using Absolute Path instead of relative path. Eg, You must use Response.Redirect("Login.aspx") where Login.aspx file is located in the same root not Response.Redirect("http://testsoft/login.aspx").
Nikhil Bandekar wrote: Is there any solution related to global.asax file ? If any kindly let me know.
As per knowledge nope... But I have seen some application are frame the URL in Global.asa or Global.asax file. You check both scenario.
|
|
|
|
|
hii...i m trying to open a file in asp.net(C#)..
here how my code looks like..
string maulik =Server.MapPath("maulik.txt");
StreamReader sr = File.OpenText("C:\\maulik.txt");
string contents = sr.ReadToEnd();
Label2.Text=contents;
sr.Close();
this works fine...but have to provide a filename...
how can i open a random file using a dialog box and then read it...
help required urgently
|
|
|
|
|
What exactly is it that you need help with? Opening the dialog box? Getting the file name from the dialog box? Using the file name in the code that reads the file?
---
single minded; short sighted; long gone;
|
|
|
|
|
i dont want to specify a file name but open a file to read while browsing 4 it...n opening it
|
|
|
|