|
Hello everybody ,
i have created an ASP.NET Web service application , but in the same solution i have created a class that implements IHTTPHandler interface
and i used this class in my web.config file as the main http handler for *.asmx extensions , i have put the following line
<add verb="*" path="*.asmx" validate="false" type="GAndroidService.Android.AndroidHandler,GAndroidService.Android" />
it works fine in Cassini embedded web server in visual studio .
but when i deploy it to my domain web server , it tells me it could not load this type or its dependencies whereas this class is associated with one of the solution folders.
how can i solve this problem IIS 6 ?
Human knowledge belongs to the world.
|
|
|
|
|
Dont ask the same question again as you asked in C# forum
|
|
|
|
|
This could be confusing to the OP as they were told in the other forum to not post there, and now you are telling them to not post here. If you read the responses to the first posting you would see they have been advised to remove the question from this forum, which they can't do now that you replied to it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Ok thats my misunderstanding, i dont check the timings. Thanks for correcting me, cheers
|
|
|
|
|
My friend i would like to inform you that the http handler works fine without injecting the assembly in the GAC , because the http handler is not in a different assembly , it is in the same assembly namespace as the whole project but the problem was as follows .
i didn't put the assembly name after declaring the fully qualified namespace of the handler
for example the assembly name is GAndroidService
and the fully qualified namespace for the handler is
GAndroidService.Android.AndroidHandler
so the assembly is successfully loaded in memory when the web service runs in the context of asp.net engine so i had to put it like that
GAndroidService.Android.AndroidHandler , GAndroidService
i hope this could help.
Thank you guys for your great support and taking time to reply
Human knowledge belongs to the world.
|
|
|
|
|
hi mates,
happy new year to all! (oshugatu omedetto gozaimasu)
i just want to ask how can i set to front a text or a pop up calendar.
i can't explain well what i want. please see link image for basis.[here]
thanks in advance
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
I could be way off the mark here, but I believe you use the CSS Z-Index property[^].
From w3schools:
The z-index property specifies the stack order of an element.
An element with greater stack order is always in front of an element with a lower stack order.
You could do this in server-side code of the calendar control, or in a CSS file - I believe using a CSS file would be better practice.
|
|
|
|
|
hi All,
My Data Access Layer trying to execute a service contract cerated by me which is inturn connecting other external web service. Its giving me the following exception.
Can anybody help me how to sort it out please.
Message "The remote server returned an error: (415) Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'.." string
I have create the biding as below and
private ICreateNewHireWorkflowState GetWorkflowStateWcfServiceClient(string endPointAddress)
{
BasicHttpBinding binding = new BasicHttpBinding();
EndpointAddress endpointAddress = new EndpointAddress(endPointAddress);
_createNewHireWorkflowStateWcfClient =
ChannelFactory<ICreateNewHireWorkflowState>.CreateChannel(binding, endpointAddress);
return _createNewHireWorkflowStateWcfClient;
}
And posting this meesage to post in to the other web service
private string CreatePostXmlString()
{
StringBuilder retString = new StringBuilder();
retString.Append(
"<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"> <s:Header> <Action s:mustUnderstand=\"1\" xmlns=\"http://schemas.microsoft.com/ws/2005/05/addressing/none\"> http://tempuri.org/IService/MyOperation</Action>
<ActivityId CorrelationId=\"b898336e-d4e2-4eb7-a2c7-1e23f4630646\"");
retString.Append(
"xmlns=\"http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics\"> 43ffa660-a0c6-4249-bb36-648b73a06213</ActivityId></s:Header> <s:Body> <StatusUpdate><CompanyCandidateCode>12345</CompanyCandidateCode><Password>1y7UV5%9</Password><OrderStatus>SAMPLE</OrderStatus><StatusString>SAMPLE</StatusString></StatusUpdate> </s:Body></s:Envelope>");
return retString.ToString();
}
Can anybody please help me in this, is it because of the xml that I am passing what could be the reason.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
Usually when I see this error, it means that there is an error on the other end (the external web service you're consuming) that's sending back a web page with an error message, hence the UTF-8 encoding. This goes for the external web service you're consuming, as well. Let me "draw a diagram", I'm confusing myself here...
Could be an error page Could also be an error page
vvv vvv
You <---> External service <---> some other service?
I would suggest trying to browse to the URL of the endpoint of the external service you are consuming:
This address here
vvvv
EndpointAddress endpointAddress = new EndpointAddress(endPointAddress);
Also, I can't help but ask why are you sending a hard-coded XML string to the service? Or is this just a test/prototype?
|
|
|
|
|
hi,
That is giving me that service is hosted. The other problem is the other service which is consumed by my service is implemeting the HttpPost.
I am not understanding where the problem is.
But one more thing when I host my service on my local machine I am not getting problem, but when I hot my service on another server and try to access
it from my web application then its giving error.
The flow here is My Web App -> My WCF Service (this can be on my local machine or remote server) -> External Web service.
When I put my My WCF Service on remote server its giving this exception other wise not.
Please help me in this regard.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
I still think you're going to be getting an error page coming back, in my experience that's what the UTF-8 encoding error means.
Other than that, I can only suggest you turn on WCF tracing[^] and check the trace logs. Almost invariably these have helped me solve problems with complex WCF configurations.
Another suggestion is using Fiddler[^] to see the data being communicated. My money's still on the response from the other end being a web page rather than XML
|
|
|
|
|
Hello CP,
I've been out of the programming loop for around 4 years now and now want to get back to it. I'm guessing there are a lot of changes since the 2005 version of VS.NET. Looking for any recommendations on getting back to it.
Thanks In Advance
Nino
|
|
|
|
|
It isn't quite hard from turning into 2010 from 2005.
There are very much changes in .Net framework as you may have used 2.0 at last, Currently it's running 4.0 latest.
You will find lots of article published in CP for 2010 from beginning to expert.
Google is always a friend, You will find lots of article on the same world wide too.
it's a very generic question and it can be answered only by ending it to google.
But I am sure It will take some time to adjust, It isn't any drastic change you will soon get adjusted.
|
|
|
|
|
VS2005 came with .NET 2.0, and all your .net 2.0 code should still work. If you didn't get into generics at the time, they are worth a review.
Changes since 2.0 then have really been add-ons (i.e. not core architecture changes) and language improvements. That's not to say there hasn't been a lot of mostly positive change, but you can apply everything you already know and introduce the new stuff as you go along.
On the ASP side of this there is ASP.NET AJAX, and you should look at WCF in place of WebServices if you use those. You might also want to get your head around ASP.NET MVC3, though I'd personally leave that till last as in lies on top of other new technologies.
As far as the backing-code is concerned the main thing to play with is LINQ in its various guises, and the new LinqDataSource (much cleaner than the SqlDataSource / ObjectDataSource for binding).
.Net 4 has fewer new features, there is good support for parallelism, which is likely to be important as the number of processors goes up.
|
|
|
|
|
|
|
Hello,
I use this code to upload image and it work very well..
if (!string.IsNullOrEmpty(fupldImage.FileName))
{
string savelocationimg = HttpContext.Current.Server.MapPath("~/upload/images/");
if (fupldImage.PostedFile.ContentLength < 50000)
{
DateTime x = DateTime.Now;
string imagename = x.Day.ToString() + x.Month.ToString() + x.Year.ToString() + x.Hour.ToString() + x.Minute.ToString() + x.Second.ToString() + x.Millisecond.ToString();
string imgext = fupldImage.FileName.Substring(fupldImage.FileName.LastIndexOf("."));
fupldImage.PostedFile.SaveAs(savelocationimg + imagename + imgext);
art.ImageURL = "~/upload/images/" + imagename + imgext;
}
}
but when I use the same code to upload a video or audio file.. it failure.. this is the code I used..
if (!string.IsNullOrEmpty(fupldVideo.FileName))
{
string savelocationvideo = HttpContext.Current.Server.MapPath("~/upload/video/");
DateTime x = DateTime.Now;
string videoname = x.Day.ToString() + x.Month.ToString() + x.Year.ToString() + x.Hour.ToString() + x.Minute.ToString() + x.Second.ToString() + x.Millisecond.ToString();
string videoext = fupldVideo.FileName.Substring(fupldVideo.FileName.LastIndexOf("."));
fupldVideo.PostedFile.SaveAs(savelocationvideo + videoname + videoext);
art.Video = "~/upload/video/" + videoname + videoext;
}
what is the problem.. and if it is incorrect code for upload video file what is the correct one?
thanks
|
|
|
|
|
In neither case do you show any code that is doing anyting with a databas as your subject states.
string videoname = x.Day.ToString() + x.Month.ToString() + x.Year.ToString() + x.Hour.ToString() + x.Minute.ToString() + x.Second.ToString() + x.Millisecond.ToString();
Replace with this
string videoname = DateTime.Now.ToString("ddMMyyyyhhmmssff");
and this
string videoext = fupldVideo.FileName.Substring(fupldVideo.FileName.LastIndexOf("."));
with this
string videoext = System.IO.Path.GetExtention(fupldVideo.FileName);
Please read some books or documentation and learn how to use the language before attempting work with it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I have a Gridview application that displays up to 80+ columns showing the various roles a user can have. The first few columns identify the user by name, dept, and job title followed by the various roles each can have, A "Yes" or "No" in a column indicates whether the user has that role. As can be expected, horizontal scrolling means that at some point the columns identifying the user are no longer seen and one gets a grid of Yes and Nos.
BTW, the reason this format is desired is so managers and supervisors can compare users and the roles assigned. As a result, sorting by the columns is important.
I looked into freezing the left most columns but can't find a solution that will work and still allow sorting by any column.
So, I would like to provide a pop-up that displays the user's identity information when one hovers over a row.
I have many possibilites but they use Ajax or have a button in a column to click.
Is this possible? I reviewed lots of articles on this website plus other websites and have not found what I am looking for. I have tried a few things but they do not do what I would like them to do. So, I thought I would ask.
Thanx in advance.
|
|
|
|
|
Of course there are many ways to handle this but essentially you need to add the behavior to the gridcell, either by adding an attribute during rendering, or by JQuery on the client side. Where the info comes from to display is the next point. Again, either construct it and attach it to the grid when being rendered, or perhaps a hidden cell. The popup window is simply a div that is floated on top in the desired location.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Sorry but your link doesn't go to any article
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
JTRizos wrote: My question is should the code used for a Datagrid work for a Gridview? I have editted my application code with code from this article and get no errors but do not know if this article also applies to a Gridview.
Because all manipulation done through JavaScript so it doesn't matter Gridview or Datagrid. It will work for any control but you have to pass required parameter for javascript function.
Thanks
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Thanx to the feedback I've recieved from this forum, I think I am almost there. Viewing the source I can see that the onmouseover and onmouseout controls have been added to each row in the Gridview as intended. However, I get a "Microsoft JScript runtime error: Object expected" error. I cannot figure out why. The code is as follows:
.aspx code
<script type="javascript">
function ShowTooltip(LName,FName,JUDesc,JTDesc)
{
document.getElementById("td0").innerText=LName;
document.getElementById("td1").innerText=FName;
document.getElementById("td2").innerText=JUDesc;
document.getElementById("td3").innerText=JTDesc;
x=event.clientX + document.body.scrollLeft;
y=event.clientY + document.body.scrollTop + 10;
Popup.style.display="block";
Popup.style.left=x;
Popup.style.top=y;
}
function HideToolTip()
{
Popup.style.display="none";
}
</script>
<div id="Popup" class ="transparent">
<div style="BACKGROUND-COLOR:#003366"><center><b>Employee Info</b></center></div>
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="td0" align="left"></td>
</tr>
<tr>
<td id="td1" align="left"></td>
</tr>
<tr>
<td id="td2" align="left"></td>
</tr>
<tr>
<td id="td3" align="left"></td>
</tr>
</table>
</div>
</div>
.aspx.cs code
private void InitializeComponent()
{
this.gvRoles.RowDataBound += new GridViewRowEventHandler(this.gvRoles_RowDataBound);
}
public void gvRoles_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.DataItem != null)
{
e.Row.Attributes.Add("onmouseover", "ShowTooltip('" +
DataBinder.Eval(e.Row.DataItem, "EmployeeNameLast").ToString() + "','" +
DataBinder.Eval(e.Row.DataItem, "EmployeeNameFirst").ToString() + "','" +
DataBinder.Eval(e.Row.DataItem, "JobUnitDescription").ToString() + "','" +
DataBinder.Eval(e.Row.DataItem, "JobTitleDescription").ToString() + "');");
e.Row.Attributes.Add("onmouseout", "HideToolTip();");
}
else
{
lblError.Text = "Nothing to report ";
}
}
Any advise will be much appreciated. Thanx again for the feedback.
|
|
|
|