|
Can application use more than one web.config file. if yes than how will it identifies the default web.config?
|
|
|
|
|
Yes you can have more than one web.config file in an application, actually you can have separate config files for all the flders what you are having in your application. Normally if you are having config files in the folder it overrides the base web.config file.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Did any of you come across this type of issue...???
When sending EMail from ASP.NET application, for some domains mail is bounced back, as follows(this is coming only for some domains, not for all)
Subject: Spam Delivery Status Notification (Failure)
The following message to [recipientEmailAddress] was undeliverable.
The reason for the problem:
5.1.0 - Unknown address error 554-'5.5.2 Invalid data in message' EMail Body Format is HTML.
Email Body contains
1. strBody += "";
2. strBody += "....";
3. strBody += " \"sometext ... it's the only way to survive.\"";// in mail signature.
Thanks in advance.
-- modified at 13:58 Tuesday 19th September, 2006
|
|
|
|
|
Hi Folks,
I am having a ASP.NET Web Application developed on my friends PC on Visual tudio 2003. Now on my system, when i run it using IIS directly its working good. But when i run it using Visual Studio 2003 in debugging mode it is giving me this message: "Unable to start debugging on WebServer" and it doesn't start.
What is that which is not allowing me to start the applicatin in Debgging mode?
Thanks for your time and Help.
Karmendra
|
|
|
|
|
Check whether debugging is enabled or not?
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks or your help Apurva, I am not good at ISS, how can i enable debugging, where should i do it??
Do what makes you happy....nJoy
|
|
|
|
|
You first check your config file for that may there you would be having:
debug="false"
Best Regards,
Apurva Kaushal
|
|
|
|
|
my config file is having debug set to true. Only after setting this i am geting the issuei posted.
Thnks again.
|
|
|
|
|
Then you check in IIS whether it set for debugging or not. For that check the property of the application in IIS. Check in directory tab whether application name is created or not.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks again,
I checked that applicaion name i already present, still it is giving the same error.
Thanks for yor time and help.
|
|
|
|
|
Have you tried these things:
1. Run "Internet Services Manager" (under Control Panel > Administrative Tools). If you are running on a server rather than a workstation then this will instead be called "Internet Information Services (IIS) Manager".
2. Find the project/application in the list of web sites. (Open up your computer in the list, and look under "Default Web Site" - or "Web Sites" if on a server).
3. Bring up its properties (Right click > Properties).
4. If the 'application name' (under "Application Settings" on the "Directory" tab) is greyed out then click '[Create]' and then '[OK]'.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I tried all the steps you metioned above. Still i am nt ableto run the application in debug mode I am still gettin the following error.
<br />
Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged.
Thanks
|
|
|
|
|
You try to re-register the aspnet account with the IIS something like this:
%windir%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
on the command promt..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi KSuthar,
did u rename the virtual directory that the project resides in.
I hope this error is occureed becoz of the IIS had decided to revert the directory from an application to the directory.
So make the application again, via the IIS Management tool.
(1)Within the IIS management tool, select your virtual dir.
(2)Right-click and select Properties
(3)In the Properties dialog box, click on the Create button.
Hope this will solve your Problem
Happy Coding
With Regards
Satips
|
|
|
|
|
This doesn't seems to be working because in my earlier reply I too have told him check the same.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Ok fine.
With Regards
Satips
|
|
|
|
|
But I too am not getting what else could be the cause for that error.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks For your help.
But already tried this, I think i tried all the usua ways aporva told me. There is something else. Let metry re registering.
|
|
|
|
|
|
Hi Karmendra,
Better once run aspnet_regiis -i in run window...then check out..
regards
srinu
|
|
|
|
|
hi
This is an intranet application.iam using an ocx control in my program.the purpose of that control is to capture the finger print of the user. i registered the activex control in registry.it given the message control registered successful.When iam running the below code normally it is working and capturing image.But if iam running the code on the server it is giving me the message AUTOMATION SEVER CAN'T CREATE OBJECT ERROR.HERE IAM PASTING THE CODE.PLEASE GIVE ME ANY SUGGESTIONS TO SOLVE THIS.
<html>
<script lang='javascript'>
function regist()
{
var err
// Check ID is not NULL
if ( document.MainForm.UserID.value == '' )
{
alert('Please enter user id !');
return(false);
}
try // Exception handling
{
var objBioEnFP = new ActiveXObject("BioEnFP.FPCapX");
document.MainForm.FIRTextData.value=objBioEnFP.LiveCaptureW(-1, 6000, 50);
//alert (document.MainForm.FIRTextData.value);
objBioEnFP = 0;
alert('Capture success !');
}
catch(e)
{
alert(e.message);
return(false);
}
// Submit main form
document.MainForm.submit();
return(true);
}
</script>
<body>
<br>
<br>
<center>
<font size=5><b>IIs Sample</b></font>
<hr>
<p>
<font color=#800000><b>Registration</b></font>
<br>
<br>
<br>
<form action='regist.asp' name='MainForm' method='post' OnSubmit='return regist();'>
<input type=hidden name='FIRTextData'>
<table>
<tr><td>User ID</td>
<td>: <input type=text name=UserID size=20></td></tr>
</table>
<p>
<input type=submit value=' Click here to register your fingerprint '>
</form>
</center>
<br>
<br>
<br>
</body>
</html>
|
|
|
|
|
There are two things that you may need to check when you host an Active control on your web page.
+ Make sure that the control is properly installed and registered on the client machine.
+ Make sure that the permission is granted to your application so that the client side script can create a new instance of the control.
|
|
|
|
|
Hi All
a) I am getting error "The remote server returned an error: (500) Internal Server Error." whenever i tried to call web service.
b) I need to pass my web method name as runtime paramter. As web service can contain multiple web methods.....I am trying to pass as SOAPACTION but i am not sure syntax or infact is it correct way or not....
FYR i am sharing source code as below
Client Code:
'Create a new HttpWebRequest to the mentioned URL.
'hard code for time being
httpRequest = WebRequest.Create("http://localhost/XYZWS/XYZCustomerService/XYZCustomerService.asmx")
' Set Request information (Header, ContentLength, ContentType, etc)
'hard code for time being. Passing sxml here.
Dim bodyData As Byte() = Encoding.UTF8.GetBytes(sXML)
httpRequest.ContentLength = bodyData.Length
httpRequest.ContentType = "text/xml; charset=utf-8"
'hard code for time being in future it will be thru parameter
httpRequest.Headers.Add("SOAPAction", "SaveCustomerService")
httpRequest.Method = "POST"
' Set 'Preauthenticate' property to true. Credentials will be sent with 'the request.
httpRequest.PreAuthenticate = True
' Create a New 'NetworkCredential' object.
Dim networkCredentials As NetworkCredential = New NetworkCredential("A", "b")
' Associate the 'NetworkCredential' object with the 'HttpWebRequest' object.
httpRequest.Credentials = networkCredentials
' Create a new RequestStream to POST info (Synchronous call)
requestStream = httpRequest.GetRequestStream()
requestWriter = New StreamWriter(requestStream)
'Write Soap message into RequestStream
requestWriter.Write(sXML)
' Cleanup
requestWriter.Close()
requestStream.Close()
' Create a new HttpWebResponse (Synchronous call)
'HttpWebResponse response = httpRequest . GetResponse ( ) as HttpWebResponse
'Dim httpResponse As System.net.HttpWebResponse
'httpResponse = httpRequest.GetResponse()
Dim httpResponse As HttpWebResponse
httpResponse = CType(httpRequest.GetResponse(), HttpWebResponse)
' Extract normal SOAP response.
responseStream = httpResponse.GetResponseStream()
responseReader = New StreamReader(responseStream)
'Fetch the XML.
Dim httpResult As String = responseReader.ReadToEnd()
' Cleanup
responseReader.Close()
responseStream.Close()
' Return XML.
'Return httpResult
Catch myerr As WebException
' Populate the table with the exception details.
ErrorTable.Rows.Add(BuildNewRow("Source", myerr.Source))
ErrorTable.Rows.Add(BuildNewRow("Error Message", myerr.Message))
ErrorTable.Rows.Add(BuildNewRow("Status", myerr.Status))
'ErrorTable.Rows.Add(BuildNewRow("Response", myerr.Response))
ErrorTable.Rows.Add(BuildNewRow("Detail", myerr.StackTrace))
Return
Catch myerr As SoapException
' Populate the table with the exception details.
ErrorTable.Rows.Add(BuildNewRow("Fault Code Namespace", myerr.Code.Namespace))
ErrorTable.Rows.Add(BuildNewRow("Fault Code Name", myerr.Code.Name))
ErrorTable.Rows.Add(BuildNewRow("SOAP Actor that threw Exception", myerr.Actor))
ErrorTable.Rows.Add(BuildNewRow("Error Message", myerr.Message))
ErrorTable.Rows.Add(BuildNewRow("Detail", HttpUtility.HtmlEncode(myerr.Detail.OuterXml)))
Return
End Try
</code>
Now here is web service code and GetXMlValue is custom function to read xml node value
<WebMethod(MessageName:="SaveCustomerService")> _
Public Function SaveCustomerService(ByVal CustomerService As String) As String
Try
Dim sUserName, sEmail, sCategory, sSubject, sMessage As String
sUserName = GetXmlValue(CustomerService, "username")
sEmail = GetXmlValue(CustomerService, "email")
sCategory = GetXmlValue(CustomerService, "category")
sSubject = GetXmlValue(CustomerService, "subject")
sMessage = GetXmlValue(CustomerService, "message")
SaveCustomerService(sUserName, sEmail, sCategory, sSubject, sMessage)
Catch ex As Exception
Dim a As New ThrowSoapException
a.myThrow()
End Try
FYI
For probelm one i added below line of code in web.config of web service also
<webServices>
<protocols>
<add name="HttpPost" />
</protocols>
</webServices>
Thanks in advance....
Amit
|
|
|
|
|
hi friends,
I'm trying an example on PostBackURL.My application has two pages,page1.aspx & page2.aspx. On page1,I've a textbox & a calendar with 2 button controls.I'm trying to display the selected contents on Page1 into a label on Page2.Here's what my code on Page1.aspx looks like
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Label1.Text = "Hello " & TextBox1.Text & " " & _
"Date Selected: " & Calendar1.SelectedDate.ToShortDateString()
End Sub
<asp:button id="Button1" runat="server" text="Submit Page to itself" onclick="Button1_Click">
<asp:button id="Button2" runat="server" text="Submit Page to Page2.aspx" postbackurl="~/Page2.aspx">
On Page2.aspx, I've included a virtual path to reference page1 &
Code on page2.aspx is:
Protected Sub PageLoad(ByVal sender As Object, ByVal e As System.EventArgs)
lblDisplay.Text = "Hello" & PreviousPage.pp_TextBox1.Text & " " & _
"Date Selected: " & _
PreviousPage.pp_Calendar1.SelectedDate.ToShortDateString()
End Sub
I'm not getting any errors & neither am i getting any display on Page2.aspx. can anyone please help me find the solution ?
Thanks a lot in advance..
|
|
|
|
|
the easiest way is using response.redirect option
On page 1
string text1 = TextBox1.Text;
string text2 = Calendar1.SelectedDate.ToShortDateString();
response.redirect("page2.aspx?message1=" +text1+",message2=" +text2 ,true);
On page 2
string ms1 = Request.QueryString["message1"];
string ms2 = Request.QueryString["message2"];
Its on C#
keep Learning and you never will be out of date...
|
|
|
|