|
hi
I registered a site with this address "MyProject.com"
and now I want to redirect every address like " ____.MyProject.com" to "MyProject.com"
ex:
mail.MyProject.com
ex:
login.MyProject.com
How can i configure IIS?
or How can i configure DNS server.
|
|
|
|
|
There is something called a host header in IIS. This allows you to map multiple web addresses to one IP address. If you open computer management and go to your web site and right click and select properties. On The web site tab there is an advanced button. The top part is where you add the multiple identities for the web site. NOTE: I believe you have to enter each of them in, I do not believe wild cards work. So you would have to enter mail.MyProject.com, login.MyProject.com etc.
Then you will have to configure you DNS server with all of the same mappings, so your DNS server knows which IP to route traffic.
Hope that helps.
Ben
|
|
|
|
|
hi
I configure DNS server.my Site with "MyProject.com" has 150.150.0.1 ip address.and other address like "___.MyProject.com" redirect to 150.150.0.1
ex:
from command line client computer
ping nnn.MyProject.com
150.150.0.1
but
when I write this address in ie address bar it return an error that says:
Page is under construction
howcan i fix it?
|
|
|
|
|
Did you configure your web site in IIS like I said in my previous post? You have to add the host headers in the advanced screen for the site to respond to the different URLs.
Ben
|
|
|
|
|
yes
But Ihae problem yet?!
|
|
|
|
|
I would guess that you didn't set up your default page correctly. What page is suppose to be the start page of your web site? In IIS you need to set it there. In IIS in the properties for the web site there is a tab called document. Usually there is Default.htm etc. You need to add your start page to the top of the list.
Hope that helps.
Ben
|
|
|
|
|
Thank you.
I cannt explain my problem more.
thank u for your answer.
|
|
|
|
|
This is my venture into the world of Web programming, so please be verbose in your answers.
I have a WinForms app which accesses a webservice which accesses a database and then returns some XML to the WinForms app.
I am currently in debug mode, and webservice is created OK. I get valid data back if I remove the database code from the equation.
My code to access the database in the webservice is:
<code>
//Connecting to Northwind database
string ConStr = "Initial Catalog=Northwind;Data Source=localhost;Integrated Security=SSPI;";
SqlConnection myconnection = new SqlConnection(ConStr);
myconnection.Open();
SqlCommand mycommand = new SqlCommand("Select * from Customers", myconnection);
SqlDataReader dr = mycommand.ExecuteReader();
dr.Read();</code>
I receive an error: An error has occurred while establishing a connection to the server.
What steps do I need to take (in both the virtual and real server) for the webservice to see the database?
Regards
Andrew
|
|
|
|
|
In your connection string in the Data Source you have it set to localhost. That is not a valid sql server name. You need to put in the name of your sql server and make sure that your server that your web service is running on can resolve the sql server name to the correct IP address.
Hope that helps.
Ben
|
|
|
|
|
I have altered the Northwind file and added
"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\SampleDatabases\NORTHWND.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True" as a connection string.
Error:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Unable to open the physical file "C:\SampleDatabases\NORTHWND.MDF". Operating system error 5: "5(error not found)".
An attempt to attach an auto-named database for file C:\SampleDatabases\NORTHWND.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Regards
Andrew
|
|
|
|
|
So it looks like the database file doesn't exist where it is expecting it. Or perhaps your web app doesn't have rights to read it. Normally you would put a sqlexpress file in the app_data folder of your web service. Then it should have access to it.
Ben
|
|
|
|
|
OK Thanks.
I tried another connection string and got a different error.
string ConStr =@"Server=localhost\SQLEXPRESS;database=databasename;Integrated Security=True";
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Cannot open database "ValuePro" requested by the login. The login failed.
Login failed for user 'USERNAME\ASPNET'.
Andrew
|
|
|
|
|
So you are using integrated security, which by default is aspnet user. You may need to change your connection string to use a set sqluser and sql password. If you still want to use integrated security, you will have to create a new application pool. Have your webservice user that app pool. Then you will have to create a new network user for the identity of the app pool. add that user to IIS_wpg group. Set the identity of the app pool to that user. Add that user to the sqlexpress database with the correct rights.
Ben
|
|
|
|
|
I am primarily an ASP .Net developer, but i have had some classic asp work come my way.
I am running into a problem with the submit funtion in forms. i have requiements for the following:
if the user checks a checkbox, then clicks save on one form, the page reloads, but the checkbox is no longer checked. hopw do i maintain the checked state of a checkbox? same for the selected items in a listbox control.
Also, some of the buttons on one form cause the page to submit, but it loads back at the top of the page. how does one modify the submit in the vb code to navigate to a named anchor (ie, page.asp#here)?
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
Vodstok wrote: hopw do i maintain the checked state of a checkbox
Render checked as the attribute of checkbox tag.
|
|
|
|
|
I'm looking for a good javascript compressor. Not specifically for obfuscation, but to ensure that the download payload is as small as possible.
Anyone using any they could recommend?
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
Well, there's always this[^] one. I've had some success with it.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Ah, excellent.
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
|
There's JSMin[^] and Packer[^], both of which seem to be well used.
|
|
|
|
|
how to implement the Ajax in ASP.Net1.0,
is it possible? if possible pls send example to me
|
|
|
|
|
Read a book, read one of the many articles on CodeProject[^], search google or take a course.
But please don't post a question until you've tried finding some information yourself.
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
Hi,
i am using Form Authentication in my asp.net appication. It creates a persistent cookie named Cookie1 in cookies folder at my system. I want to change/set the Name of this cookie to Cookie2 on the click of a button from page.How can i do that ? (Q: Does form authentication always created persistent cookie, how can i change it so that when i close the browser , the coookie also goes off ?)
Alternatly, if i can create a new form authentication cookie at the same place with the name Cookie2. i am using following code.But cannot see my cookie2 in the folder
protected void LinkButton2_Click(object sender, EventArgs e)
{
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, "username", DateTime.Now, DateTime.Now.AddMinutes(30), true, FormsAuthentication.FormsCookiePath);
string encryptedTicket = FormsAuthentication.Encrypt(ticket);
HttpCookie authCookie = new HttpCookie("cookie2", encryptedTicket);
authCookie.Expires = System.DateTime.Now.AddMinutes(30);
authCookie.Secure = true;
Response.Cookies.Add(authCookie);
}
Any code support will be of great help.
Thx
|
|
|
|
|
Hi,
maybe this link can help you
Regards,
Tomi
|
|
|
|
|
hi,
im posting my requirements here,your suggestions are very much appreciated .
since im new to ajax tool kit im not much familiar about most of the controls,could anyone can suggest me to use appropriate controls for my query?
in my system i have nearly 100+ forms,and different categories of users.normally once new user is created,admin have to give access rights for the forms to new user.now the admin doing this by using a form which got list of all the forms in my projects witha check box,so admin have to manually check the appropriate name of the form for diff catagories of user and save it.
now the problem starts here,wen user create new forms then this access rights page need to be modified to add check control with new form name and data base need to modify to add new form name and access rights, how can i make it automatically,meaning once i create new form,the form related info must add to acceess right page with chk box, and also in data base
The Best performance for good work tomorrow is to do good work Today
|
|
|
|