Asp Classic Wrong Encoding - sql-server

I've developed a web site sine 2001 with asp classic and MS SQL Server
from 2 months ago i accessed my web site and i found that all my database records have a different encoding character, specially the Arabic data , it has unknown encoding character which indicates that the database has been corrupted or something happen However, there is no Development updates happened .....
i want to restore my real database with it's arabic data ,
So any one have a solution to fix this problem please feedback . also i scare this problem could spread to all web site developed with Asp classic ....

Have you checked if your site have been hit by some SQL Injection there are some bots that write javascript to all varchar fields, maybe i could mess up Arabic Data as well.
Here are some tips to prevent the problem:
http://blogs.iis.net/nazim/archive/2008/04/28/filtering-sql-injection-from-classic-asp.aspx

Related

Convert nested XML file to some kind of database format and displaying on website

Heyos!
I am in sincere need of help and advice with a project I have to work on.
Let me give you a brief overview:
Context:
MeSH-Browser is a website used for displaying "[...] hierarchically-organized terminology for indexing and cataloging of biomedical information [...]" (see: https://www.nlm.nih.gov/mesh/).
The MeSH-data can be downloaded from here: https://www.nlm.nih.gov/mesh/download_mesh.html
What is the task:
Displaying MeSH-data on a website.
What is given:
MeSH-data as mentioned above (see: https://www.nlm.nih.gov/mesh/download_mesh.html).
What is the catch:
I have no experience in developing a back- and frontend.
What I have come up so far:
I figured out that I need to develop a back- and frontend as well as the communication between those.
Convert given MeSH-data in .xml format to database input format.
Create a server running a database fed with the converted MeSH-data.
Communication between database and website.
A website for displaying the data stored in the database.
After googling I found a GitHub project with "Code and documentation for the release of MeSH in RDF format" (see: https://github.com/HHS/meshrdf/).
Hence I set up a virtual machine running an ubuntu server and installed OpenLink's Virtuoso software (see: https://virtuoso.openlinksw.com/), which can be used for querying the resulting RDF.
What has to be done next is integrating the converted MeSH-data in RDF into the Virtuoso database (have not looked into this yet).
Considering the communication with the frontend, I was thinking about using one of the libraries mentioned on https://www.w3.org/community/rdfjs/wiki/Comparison_of_RDFJS_libraries and query the data with the help of SPARQL.
As frontend I would use ReactJS as I find it appealing to me.
That is all for now, what are your opinions?
Please do note that this is only for educational purposes.

DateTime Covert on data post using WebApi?

I am working on MVC 4 project with AngularJS. I have some date filed in my form. I am facing an strange issue when i post data to server using $http.post(). When i post any date like January 01,2013 is converted to 12/31/2012 on Server which gives an error on Server Post. I am not getting what is going wrong in my code base.
Hope you got my question.
When dealing with dates you have to be careful as to how they are serialised on the front-end and back-end. There is no standard.
Given your description and lack of other context though, I suspect it's a time zone issue.
are you developing locally? i.e. are browser and server running on the same machine?
(if not) what's the timezone the server is using? UTC?
Here's a post detailing some issues with JSON date serialization: "On the nightmare that is JSON Dates. Plus, JSON.NET and ASP.NET Web API"
If you're not sure what's going on with serialisation you can use something like curl (*nix or maybe cygwin tool) or "Fiddler" to see the raw responses. Other things to do are to explicitly use date's toString() method to serialise the date as a string (and change on the server side too seeing you're using .Net) to explicitly control the deserialisation.

How to display a SQL Server Report in a .net webpart for SharePoint?

Can anyone describe to me the exact steps in displaying a SQL Server Report hosted on the report server (Remote mode) in a customized webpart? I realize that there is an out of the box web part that comes with SSRS but I want to be able to have already configured webparts that display specific reports available for users to add in their edit site modes. Essentially, the goal is to have a report such as 'Assigned Hours' as a web part itself, and anyone interested in displaying Assigned Hours need only click on Site Actions, Edit Page, Add Web Parts, and choose the Assigned Hours Web Part. No need for configuring a report server url or report path. Also, for certain reasons we would like to continue running the report server in native mode so Integrated mode with SharePoint is not an option.
So, below is a summary of my situation and what I have already tried:
Environment is WSS3.0, Microsoft SQL Server 2005
I have created a .net webpart and am attempting to add an instance of the ReportViewer control to the webpart. I have set to run in remote processing mode and have extended the abstract IReportServerCredentials class to handle the authentication.
I have made sure that the assembly is set to AllowPartiallyTrustedCallers
The project compiles fine. I place the dll in the correct wss bin folder for webparts.
When I try to view the webpart I get the site error message 'That assembly does not allow partially trusted callers.'
I've read things about registering my assembly with SQL Server, which I have tried with the CREATE ASSEMBLY SQL syntax, but that I am getting an sql query error saying that the there is already a reference to another assembly and that it can not find it in the same location.
Honestly, I don't really know enough about SQL Server and reporting services to know if I am close to getting it to work or if I have everything set up completely wrong in the first place. I have made custom webparts before and successfully deployed them to the site, so I know the problems lie in my ignorance of the SSRS and SQL Server. Has anyone else accomplished what I described early before? Thanks in advance!
I suggest using an ASP.NET ReportViewer control in your web part. These controls allow you to customize all parts you mentioned and are fairly easy to use and set-up. The one thing to watch for though with this control would be browser compatibility. Out of the box, it doesn't work too well with Firefox or Chrome. If you wanted though you could attached to the Reporting Services service which would give you the data you want back, then write a template-able control that used that structure to output the data. That option is much more complex, but allows for the format to be defined by the web part, rather than the report.

Integrate Access report

How can I integrate Reports done in Microsoft Access in my WPF application?
You'll have to define a little bit more what you mean by integration.
You are talking about a desktop application like word or PowerPoint or in this case Access. You can certainly automate or use Access as a com object and have access reports output their results as RFT or likey even better as a PDF document. So, it not clear when you speak of integration is really much centered around how you going to prompt the user for those report paramters and ask the user for filtering etc. So, choices you have range from a simple nightly batch job that runs and creates a bunch of PDF files on the users desktop and then are copied to a server, or perhaps even FTP up to the server.
Perhaps you talking about something a little bit tighter here?
So I'm not really sure if your questions any different than how would you integrate some PDF documents, or PowerPoint presentation, or in this case some Access reports. They are all the same concept and your question not really different then asking how to do this with power point.
However keep in mind that for Access 2010, there is WEB based reporting now. Those web reports actually use behind the scene are fully built around SQL server reporting services. In this case, the data will reside on SharePoint, but the WEB report side of Access are WPF presentation compatible reports since they are web based and run using sql server reporting services (they are RDL reports).
On the other hand if you're not really using Access in this case. You might as well just use the web based SQL server reporting service then. So do keep in mind that the web based reports Access uses for access 2010 is/are based on SQL server reporting services and it's actually creating RDL compatible reports.
However if you're not talking about the web based edition of access available in for 2010, then you're back to any old desktop program like excel are word or PDF documents or in this case Access. So, there's nothing different here about any old desktop program in windows and Access is one of those programs (sans the new weeb stuff for 2010).
So, the approach (or shall I say challenge) to getting that data into your presentation layer is not really a specific question to access alone, but is really much like a asking how can you have the output of your PowerPoint presentation brought into WPF.
You likely be best to have the report's render its output as PDF, or perhaps the XPS document writer is a sutiable output. So, your code take it from that point onwards for printing or display. So if you have the means to display a PDF or XPS doc, now then this would be a possible road to go down.

Update a local/client Microsoft Access Database from a server (MS SQL Server2005)

I've got a website that runs on a shared hosting environment, using ASP.net 2.0 (C#) and MS SQL Server 2005. I've recently been asked if I can integrate my website with a piece of third party desktop software that uses the Access runtime as its database (transparent to the end user).
Primarily I want to be able to offer users of my website the option of exporting their data into the Access database on their local machine. The data schema's match sufficiently, the question is how to actually do this, and in the simplest way possible for the user.
Simply having a webpage update the local Access database isn't possible due to the obvious security restrictions. I've considered asking them to upload the Access database to the server, so I can migrate the data then allow them to download it again, however the competency of the users of this software is such that even locating the Access database, let alone uploading and downloading it from the website might be too complicated.
I've also considered if Adobe Air or Silverlight could help here, but don't know them well enough to know for sure. Similarly I'm assuming another exe could be written to perform this task that the user could simply download and run, however my experience is in web development, not program development, so this isn't a 100% certainty for me, or an ideal development option for me.
So, can this be done, and if so what technique can achieve this, with the stated aims being ease of use for the end user, followed by ease of development by someone with web development as their main skill. Many thanks!
You may find this answer of interest: Best way to stream files in ASP.NET
It is about transferring a file from the server. You could save Excel or CSV and use that to update Access.
Instead of trying to do this in a web page you might just expose some views from your sql server to some client specific logins.
Then within the Access application, allow them to tie to your sql server. You might even provide an access application for getting the data from your site and stuffing it in their local access database.
In my work we have done something similar that is transparent to the user by creating an ActiveX control. The problem is that you are limiting the users to use only Internet Explorer.
I think that the best way to achieve what you are trying to do is by installing a service in the client's computer. If creating a service is beyond your experience you can post a project in a place like oDesk and find somebody that can help you with the development for the money that you are willing to pay to complete your project.
Good Luck.

Resources