|
Hi Experts,
I need to detect whether a destination email domain has TLS enabled or not? Can any one help me how to do that.
Thanks,
|
|
|
|
|
Hello,
The user is given a text box to enter text. What would we need to do, to allow user to save the text along with HTML tags? VS 2010 is not allowing this due to security reasons. Is there a way we can save text like Testing?
We are trying to save this test to the database.
Many thanks!
|
|
|
|
|
Not enough information. If all you want to do is save some text to a database that is simple as would be saving to a file: there are thousands of examples of how to do this both here and through Google. What do you mean by HTML tags? Where are they from? The page itself? You need to be clear about what you are trying to do though I have to say this does sound liek homework even though you say 'we'.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
I experienced that problem also: the text in the text box contained html tags (<b>Testing</b>), and I received some security warnings. Sorry that I do not remember how I resolved that, but I can confirm the existence of the problem.
|
|
|
|
|
Find Here[^]. After reading this, you can think about what to do with ValidationRequest flag.
|
|
|
|
|
I am trying to access a Java web service from an ASP.NET application written under Visual Studio 2010. If I just try to retrieve the WSDL using the URL (modified for security) below I receive the error that follows.
http://PathToWebService/ServiceName?WSDL
<error>
<description>Unable to generate WSDL 1.1 for this service</description>
<reason>If you wish Axis2 to automatically generate the WSDL 1.1, then please set useOriginalwsdl as false in your services.xml</reason>
</error>
If I try to add a service reference for the URL I receive the error at the bottom of this message. Does anyone happen to know what I might be able to try on the ASP.NET end to resolve this issue?
Thanks...
There was an error downloading 'http://PathToWebService/ServiceName'.
The request failed with the error message:
--
--MIMEBoundaryurn_uuid_7831B404AE7996BD4D1329310360131
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:7831B404AE7996BD4D1329310360132@apache.org>
<soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Text xml:lang="en-US">The endpoint reference (EPR) for the Operation not found is /ServiceName and the WSA Action = null</soapenv:Text></soapenv:Reason>
--MIMEBoundaryurn_uuid_7831B404AE7996BD4D1329310360131--
--.
Metadata contains a reference that cannot be resolved: 'http://PathToWebService/ServiceName'.
The content type multipart/related; boundary=MIMEBoundaryurn_uuid_7831B404AE7996BD4D1329310361638; type="application/xop+xml"; start="<0.urn:uuid:7831B404AE7996BD4D1329310361639@apache.org>"; start-info="application/soap+xml"; action="http://www.w3.org/2005/08/addressing/fault" of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '--MIMEBoundaryurn_uuid_7831B404AE7996BD4D1329310361638
Content-Type: application/xop+xml; charset=utf-8; type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:7831B404AE7996BD4D1329310361639@apache.org>
='1.0'='utf-8'<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.w3.org/2005/08/addressing/fault</wsa:Action><wsa:RelatesTo>urn:uuid:84d945e1-b9fc-4390-9626-02fd9dd40575</wsa:RelatesTo></soapenv:Header><soapenv:Body><soapenv:Fault><soapenv:Code><soapenv:Value>soapenv:Sender</soapenv:Value><soapenv:Subcode><soapenv:Value xmlns:wsa="http://www.w3.org/2005/08/addressing">wsa:ActionNotSupported</soapenv:Value></soapenv:Subcode></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">The [action] cannot be processed at the receiver.</soapenv:Text></soapenv:Reason><soapenv:Detail><wsa:ProblemAction xmlns:wsa="http://www.w3.org/2005/08/addres'.
The remote server returned an error: (500) Internal Server Error.
If the service is defined in the current solution, try building the solution and adding the service reference again.
|
|
|
|
|
can any one help me in writing the data access code . I am not been able to write correct for dal. i do have proper logic about creating n tiers.
|
|
|
|
|
|
|
<script type="text/javascript">
$(function() {
$(".showreply").click(function(evt) {
evt.preventDefault();
$(".reply").slideToggle('slow');
});
});
</script>
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"
Width="988px" Height="35px" HorizontalAlign="Left" BorderStyle="None"
DataKeyField="id">
<AlternatingItemStyle BackColor="White" />
<ItemStyle BorderColor="#CCFFFF" BorderStyle="Solid" BorderWidth="2px" />
<HeaderStyle Height="0px" />
<ItemTemplate>
Reply By:
<asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>'
style="color: #990000" />
Department:
<asp:Label ID="DepttLabel" runat="server" Text='<%# Eval("Deptt") %>'
style="color: #990000" />
Designation:
<asp:Label ID="DesignationLabel" runat="server"
Text='<%# Eval("Designation") %>' style="color: #990000" />
<asp:Label ID="useridLabel" runat="server" Text='<%# Eval("userid") %>' />
<br />
<div style="border: 0px solid #C0C0C0; height:auto; background-color: #D9FDDE;">
<asp:Label ID="commentsLabel" runat="server" Text='<%# Eval("comments") %>' />
</div>
Posted On:
<asp:Label ID="dateLabel" runat="server" Text='<%# Eval("date") %>' />
<br />
<div id="s1" style="width:123px; height:20px; background-color: #FF9933; float:left;" class="showreply">Post Reply</div>
<br />
<div class="reply" style="display:none">
<asp:TextBox ID="TextBox2" runat="server" TextMode="MultiLine" Height="75px"></asp:TextBox>
</div>
</ItemTemplate>
</asp:DataList>
It works but it slide(open) all div in datalist on click s1 div.
How to open div respective to s1 div at a time.
|
|
|
|
|
I think you should find something unique to identify the div.
for example
modify the s1 div to be run at server(this would give it unique values of id every single instant).
then add the id to the JQuery selector
$("#" + this.id + " div.reply").slideToggle('slow');
Good Luck
Help people,so poeple can help you.
|
|
|
|
|
Hi All,
Can any body help me with some code to send mail using smtp i have a code but mail is not send to a particular mail id. i have written a code as
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress("xyz@gmail.com", "ABC");
message.From = fromAddress;//here you can set address
message.To.Add("abc@gmail.com.com");//here you can add multiple to
message.Subject = "Feedback";//subject of email
message.Body = @"Plain or HTML Text";
smtpClient.Send(message);
}
catch (Exception ex)
{
lblmsg.Text = "ERROR : " + ex.Message;
}
this code works fine but mail is not been send.
Thanks in Advance
Elizabeth
|
|
|
|
|
Elizabeth Rani wrote: this code works fine
Really? Have ever looked at lblmsg ?
Nowhere did you set the Host , Port , EnableSsl , and Credentials properties of the SmtpClient . It must fail because of that.
Next, some mail providers check that the From property of the MailMessage is the address of the user identified by the UserName of the Credentials - in case of doubt, they'll refuse to send the mail.
|
|
|
|
|
Hi,
Can you help me some sort of code please.
Thanks in advance
|
|
|
|
|
Dim strMsg As String
strMsg = txtMessage.Text
If strMsg.Length >= 140 Then
strMsg = strMsg.Substring(1, 140)
End If
mTo = Trim(txtToNumber.Text) & _
Trim(cboCarrier.SelectedItem.ToString())
mFrom = Trim(txtFrom.Text)
mSubject = Trim(txtSubject.Text)
mMsg = Trim(txtMessage.Text)
mMailServer = ConfigurationManager.AppSettings.Get("MyMailServer")
mPort = ConfigurationManager.AppSettings.Get("MyMailServerPort")
Try
Dim message As New MailMessage(mFrom, mTo, mSubject, mmsg)
Dim mySmtpClient As New SmtpClient(mMailServer, mPort)
mySmtpClient.UseDefaultCredentials = True
mySmtpClient.Send(message)
MessageBox("The mail message has been sent to " & _
message.To.ToString())
Catch ex As FormatException
MessageBox("Format Exception: " & ex.Message)
Catch ex As SmtpException
MessageBox("SMTP Exception: " & ex.Message)
Catch ex As Exception
MessageBox("General Exception: " & ex.Message)
End Try
End Sub
|
|
|
|
|
Hi
i am running wcf service in IIS, when i make a POST request from the rest client with .net development environment server i am getting the break points hit and the service is responding but when i am accessing through IIS URL(http://localhost//Service/service.msc) it fails and i am not getting break points hit and getting message
HTTP/1.1 404 Object Not Found .
i am confused that why the service is not responding when i accessed the iis deployed service.
it will be very helpful if i am getting out from this issue.
thanks
|
|
|
|
|
Are you running the client on the same machine as the server? If not the localhost in the url is wrong.
Also the url contains two forward-slashes where they should not be: http://localhost//Service/service.msc
I assume this is a typo, but thought it worth mentioning just in case.
|
|
|
|
|
Yes i am accessing client on the same machine.
sorry typo error when composing a message but my REST client is having the following URL
http://localhost/Service/service.msc
Even i tried from different machine with the following
http://172.29.xxx.xx/Service/service.msc
In both scenarios i am getting the following page saying my service living but not able to post a request.
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
svcutil.exe http:
This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:
C#
class Test
{
static void Main()
{
CDataServiceClient client = new CDataServiceClient();
client.Close();
}
}
Visual Basic
Class Test
Shared Sub Main()
Dim client As CDataServiceClient = New CDataServiceClient()
' Use the 'client' variable to call operations on the service.
' Always close the client.
client.Close()
End Sub
End Class
when i try to access its method by the following
http://172.29.xxx.xx/Service/service.msc/methodcall
[method :POST]
{
"json format inputs"
}
modified 15-Feb-12 5:52am.
|
|
|
|
|
hello guys, please am currently designing a test website with asp.net(vb)and i also have webservice that i placed all my connections, but the problem am currently having is that whenever i run the webservice to test what i have done it always bring an error, please what can i do. below is the code am talking about.
<WebMethod()> Public Sub InsertInfo(ByVal Name As String, ByVal picbox As FileUpload)
Dim mycon As New SqlConnection(conStr)
Dim img As FileUpload = CType(picbox, FileUpload)
Dim imgByte As Byte() = Nothing
If img.HasFile AndAlso Not img.PostedFile Is Nothing Then
Dim file As HttpPostedFile = picbox.PostedFile
imgByte = New Byte(file.ContentLength - 1) {}
file.InputStream.Read(imgByte, 0, file.ContentLength)
End If
mycon.Open()
Dim cmdText As String = "Insert into tblSave([Name],picture) VALUES(@Name,@pix)"
Dim cmd As New SqlCommand(cmdText, mycon)
cmd.Parameters.AddWithValue("@Name", Name.Trim())
cmd.Parameters.AddWithValue("@pix", imgByte)
cmd.ExecuteScalar()
End Sub
|
|
|
|
|
What's the error message, in which line does it arise?
|
|
|
|
|
@bernhard hiller below is the error message
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The XML element 'EnableTheming' from namespace 'http://xbf.com/' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the element.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: The XML element 'EnableTheming' from namespace 'http://xbf.com/' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the element.]
System.Xml.Serialization.XmlReflectionImporter.AddUniqueAccessor(INameScope scope, Accessor accessor) +849987
System.Xml.Serialization.XmlReflectionImporter.AddUniqueAccessor(MemberMapping member, INameScope elements, INameScope attributes, Boolean isSequence) +84
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +1553
[InvalidOperationException: There was an error reflecting property 'EnableTheming'.]
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +2167
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +223
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1415
[InvalidOperationException: There was an error reflecting type 'System.Web.UI.Page'.]
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1621
System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +10296
System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter) +139
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +1273
[InvalidOperationException: There was an error reflecting property 'Page'.]
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +2167
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +223
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +223
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1415
[InvalidOperationException: There was an error reflecting type 'System.Web.UI.WebControls.FileUpload'.]
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1621
System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +10296
System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +722
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +236
[InvalidOperationException: There was an error reflecting 'picbox'.]
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +843
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access) +130
System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, Boolean serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use, SoapParameterStyle paramStyle, String elementName, String elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members, Boolean validate, Boolean openModel, String key, Boolean writeAccess) +223
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +1971
[InvalidOperationException: Method Service1.InsertInfo can not be reflected.]
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +6527
System.Web.Services.Description.SoapProtocolReflector.ReflectMethod() +91
System.Web.Services.Description.ProtocolReflector.ReflectBinding(ReflectedBinding reflectedBinding) +1798
System.Web.Services.Description.ProtocolReflector.Reflect() +703
System.Web.Services.Description.ServiceDescriptionReflector.ReflectInternal(ProtocolReflector[] reflectors) +394
System.Web.Services.Description.ServiceDescriptionReflector.Reflect(Type type, String url) +109
System.Web.Services.Protocols.DocumentationServerType..ctor(Type type, String uri) +156
System.Web.Services.Protocols.DocumentationServerProtocol.Initialize() +284
System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) +50
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +77
[InvalidOperationException: Unable to handle request.]
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +285
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +183
[InvalidOperationException: Failed to handle request.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +354
System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +212
System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +47
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +307
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
|
|
|
|
|
Hi Guys,
Are you still working on some ASP Classic codes?
I am working on file upload in ASP Classic (not ASP.Net). And I am declaring my form as follows:
Problem: (when using ENCTYPE="multipart/form-data)
Response.Write(Request.Form("txtSample")) '--- returns blank
of course removing the "multipart/form-data" will solve the issue, but I am working on file upload and I need that.
Is there a work around where I can get the value of input text after clicking the submit?
Thanks
hifiger2004
|
|
|
|
|
Hi to all,
How to withdraw money from PayPal.
Thanks
Farogh Haider
Web developer
|
|
|
|
|
Hi Experts,
I need to find whether the TLS is enabled or not. If it is not enabled, i have to show some message. Kindly guide me any sugessions.
Regards.
|
|
|
|
|
Assuming you don't mean Theatrical Lighting Systems or Top Law Schools, you still need to provide a bit more detail.
Failure is not an option; it's the default selection.
|
|
|
|
|