|
OK, I finally have a client that wants me to deploy a web app (all my previous clients have only wanted the files, and they would take the responsibility of loading them onto the server.) Anyway, I have never done this before, and I seem to be having some difficulties. It could be a problem with the hoster (Earthlink), but I want to make sure that I'm doing everything correctly before I start complaining to the hoster.
I am first uploading a super simple, almost Hello World app. As I understand it, the only files I really need are:
Default.aspx (or whatever the page is named)
Web.config
the code behind DLL
When I do a deployment from Visual Studio, the first 2 files are in the top directory, and there is the /bin subdirectory with the DLL, and also a Program Debug Database (that I obviously I would not want to have, unless I were debugging the app.) Anyway, I used the Deployment menu item and FTP'd it to the server with no problem; the files were in the same relative subdirectory system on the server.
I try to go to the URL of the Default.aspx, and I get the message:
The requested URL /default.aspx was not found on this server.
I would think that if there was some problem with the DLL being in the wrong directory (e.g., maybe it should go in the top level dir?), that at least the ASPX file would load up, just with nothing happening, or some ugly message, if I did anything. I am not even getting that, so I think it is a problem with the hoster.
So anyway, I'd like to know if I have at least done everything on my end correctly. Thanx
|
|
|
|
|
Is IIS set up to run ASP.NET ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I don't know if the hoster has this properly setup. Are you saying that if this were not set up, that this type of error could happen?
|
|
|
|
|
Yes, if the host is not set up for ASP.NET, you will get an error.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi All,
We want to manually publish a asp.net website, We have read that .net framework 2.0 does not need any precompilation of the code to publish as a website , So we tried to publish a simple application in IIS 6.0 as a new website, we gave the right path of the file , set all the properties and the permission, but when we browse the website in IIS console itself it displays as "The Page cannot be displayed ". Can someone help us in getting the right way to create a website with the non compiled aspx code.
Regards,
Nancy
|
|
|
|
|
Is IIS set up to run a .NET 2.0 website ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for your help. We missed to set the IIS for Asp.net 2.0
|
|
|
|
|
How to encrypt and decrypt text in asp.net? I can able to encrypt text from textbox but i don't how to decrypt it.
|
|
|
|
|
Well, if you encrypted it, you should know how to decrypt it, you reverse the same method. Hashes like MD5 are not encryption, and cannot be reversed. Look at the Cryptography namespace to see what your options are.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Is there any method to encrypt & decrypt text?
|
|
|
|
|
There are many. They are all in that namespace I told you to look into.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I tried below code for encryption
MemoryStream ms = new MemoryStream();
Rijndael alg = Rijndael.Create();
System.Text.Encoding enc = System.Text.Encoding.ASCII;
byte[] input = enc.GetBytes(TextBox1.Text.ToString());
CryptoStream cs = new CryptoStream(ms, alg.CreateEncryptor(), CryptoStreamMode.Write);
cs.Write(input, 0, input.Length);
cs.Close();
byte[] encrypt = ms.ToArray();
TextBox2.Text = enc.GetString(encrypt);
its work fine.
to decrypt this i used the below code
MemoryStream ms = new MemoryStream();
Rijndael alg = Rijndael.Create();
System.Text.Encoding enc = System.Text.Encoding.ASCII;
byte[] input = enc.GetBytes(TextBox2.Text.ToString());
CryptoStream cs = new CryptoStream(ms, alg.CreateDecryptor(), CryptoStreamMode.Write);
cs.Write(input, 0, input.Length);
cs.Close();
byte[] decrypt = ms.ToArray();
TextBox3.Text = enc.GetString(decrypt);
but this throws exception as
Padding is invalid and cannot be removed.
how can i come out of this problem?
|
|
|
|
|
Use this class...
public class Rijndael
{
public static string Encrypt(string text, string key)
{
RijndaelManaged rijndael = new RijndaelManaged();
byte[] plainText = System.Text.Encoding.Unicode.GetBytes(text);
byte[] salt = Encoding.ASCII.GetBytes(key.Length.ToString());
PasswordDeriveBytes secretKey = new PasswordDeriveBytes(key, salt);
ICryptoTransform Encryptor = rijndael.CreateEncryptor(secretKey.GetBytes(32), secretKey.GetBytes(16));
MemoryStream memoryStream = new MemoryStream();
CryptoStream cryptoStream = new CryptoStream(memoryStream, Encryptor, CryptoStreamMode.Write);
cryptoStream.Write(plainText, 0, plainText.Length);
cryptoStream.FlushFinalBlock();
byte[] cipherBytes = memoryStream.ToArray();
memoryStream.Close();
cryptoStream.Close();
return Convert.ToBase64String(cipherBytes);
}
public static string Decrypt(string text, string key)
{
RijndaelManaged rijndael = new RijndaelManaged();
byte[] encryptedText = Convert.FromBase64String(text);
byte[] salt = Encoding.ASCII.GetBytes(key.Length.ToString());
PasswordDeriveBytes secretKey = new PasswordDeriveBytes(key, salt);
ICryptoTransform Decryptor = rijndael.CreateDecryptor(secretKey.GetBytes(32), secretKey.GetBytes(16));
MemoryStream memoryStream = new MemoryStream(encryptedText);
CryptoStream cryptoStream = new CryptoStream(memoryStream, Decryptor, CryptoStreamMode.Read);
byte[] plainText = new byte[encryptedText.Length];
int DecryptedCount = cryptoStream.Read(plainText, 0, plainText.Length);
memoryStream.Close();
cryptoStream.Close();
return Encoding.Unicode.GetString(plainText, 0, DecryptedCount);
}
}
e.g.
TextBox2.Text = Rijndael.Encrypt(TextBox1.Text, "SecurityKey");
TextBox3.Text = Rijndael.Decrypt(TextBox2.Text, "SecurityKey");
modified on Wednesday, August 26, 2009 10:46 AM
|
|
|
|
|
|
Thanks a lot its working supereb. Thanks............
|
|
|
|
|
hi,
below is my application mappath to a xml file.
Dim strCurrPath As String = Request.PhysicalApplicationPath
Dim strXMLDoc As String = strCurrPath & "xml\" & "login.xml"
Output is = C:\Inetpub\wwwroot\Newsletter\Newsletter\xml\login.xml
how can i make such a way that i want the login.xml to be locate outside application path? example:
C:\Inetpub\wwwroot\Newsletter\login.xml
i just want to protect the login.xml from being viewable by browser when user enter direct url to it. Is there any other way to protect the xml? I dont want to touch IIS because of some internal reason. Can it be done inside web.config?
Thx.
|
|
|
|
|
VinothRao wrote: Can it be done inside web.config?
Yes, you can use the location element in the web.config file to restrict access
<br />
<configuration><br />
<location path="Login.xml"><br />
<system.web><br />
<authorization><br />
<deny users="*"/><br />
</authorization><br />
</system.web><br />
</location><br />
</configuration><br />
only two letters away from being an asset
modified on Tuesday, August 25, 2009 9:05 PM
|
|
|
|
|
hi,
i did some of that but i still able to access it. i test from localhost.
the following is my web.config.
<system.web>
<authentication mode="Forms">
<forms name=".ASPXFORMSAUTH" loginUrl="login.aspx" defaultUrl="Home.aspx" protection="All" path="/" timeout="30" />
</authentication>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
<location path="login.xml">
<system.web>
<authorization>
<deny users="*" />
</authorization>
</system.web>
</location>
modified on Tuesday, August 25, 2009 10:09 PM
|
|
|
|
|
I am trying to handle exception(basically I am entering exception details in database) in Page_Error Event of master page also for some child pages I need to have some different exception handling. So if Page_Error in both places duplicate data is going to be inserted in database. So can any one have any Idea to override Page_Error event of master page in Child Page.
Thanks....
|
|
|
|
|
Khadir009 wrote: So can any one have any Idea to override Page_Error event of master page in Child Page.
Yes, it's called Structured Exception Handling. Use try/catch blocks to handle the exception at the lowest level and bubble them up when, and if, necessary.
only two letters away from being an asset
|
|
|
|
|
Thanks man!! Just I need to throw exception on child page or i need to handle it another way, instead this I am trying to override events on master and child. My problem solved, thanks once again....
|
|
|
|
|
I have a ASP.Net Report viewer runniong a report that displays the corredt number of rows but the cells arenot showing data. Any ideas? When I run the query in server explorer, I see the data and the number of rows on the report match that.
|
|
|
|
|
Hi Every body
I'm a prgram writer
now in want learn insert ,update,delete and select in with ADO.EF.
I heard about ADO.net EF but I don't know what is it.Please tell me about it and tell me about (insert ,update,delete ) in it.
Best Regards
You are win if you want
|
|
|
|
|
what do you want to do?!
correct your Signature:You can win if you want.
|
|
|
|
|
Hi
In Ahange Modern talking boode.doroste.eshtebah nist.
dar morede ADO.net Entity frame work chzimidooni ke komakam koni
(This is a statemet of Modern Talking music)
m.profess.mrn@gmail.com
Best regards
You are win if you want
|
|
|
|