|
Thanks Christian!
And sorry for my bad English.
1.
"If your database schema changes, you need to change your webservice, too. How often does this happen?" -- yes I need to change web service code. But ASP.Net code and some Java JSP code are out of my control (not all, but a part of) -- 3rd party assets. I can not force them to change code. So, I want to provide data presentation as a web service layer to make schema change transparent to all clients.
About how often -- for every month, there is some schema level change.
2.
"What on earth makes you think that ?" -- I have been hacked before at the front layer ASP.Net, and the hacker access database directly.
3.
"Just to clarify, I assume you're talking about a data layer that connects to a SQL database, not having SQL in your presentation layer, right ?" yes.
4.
In the future, I may introduct cache server and file based server, and I want to use a middle layer web service to transparent the data source differences to ASP.Net layer. Any comments? Does such design make senses?
regards,
George
|
|
|
|
|
George_George wrote: "What on earth makes you think that ?" -- I have been hacked before at the front layer ASP.Net, and the hacker access database directly
Well, at some point, you need to present a website to the world and make sure your server is secure, this is not the fault of ASP.NET. A webservice is just the same, it's on a server, and it needs to know your database passwords, etc. The intelligent thing to do is to not make your website have SA access, but only access to run procs, which then define the scope of what people can do with your db if hacked,.
George_George wrote: In the future, I may introduct cache server and file based server, and I want to use a middle layer web service to transparent the data source differences to ASP.Net layer.
In that case, a layer of abstraction may make a lot of sense, yes.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks Christian,
If you think it makes senses to have an additional data access layer, then any advice or solutions to the two issues I mentioned in my original post?
regards,
George
|
|
|
|
|
1 - if it's a bottleneck depends on your site's traffic and your site's resources
2 - you CAN return a datatable from a webservice, but I'd lean towards passing strongly typed collections of entity objects.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
George_George wrote: About how often -- for every month, there is some schema level change.
Ok. So are you saying your database structure changes every month? You can reduce code changes if you design your database well. Don't access the tables directly on the code. Use views to abstract the internal table structure. Use procedures to abstract the data insertions/updations. In such case, a table structure change will not affect your code. You only need to change the procedures/views.
|
|
|
|
|
See Connecting to Databases in ASP.NET[^] if helpful?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hello Everybody
I want to send email after getting payment confirmation from PayPall. For example:
1. Customers have chosen product
2. Want to make payments through PayPall
3. If payments confirmation is confirm from PayPall
4. Then I want to add that order into order table
5. Then send a Email confirmation to Customer
What is the best way to do it.
Thanks
Sarfaraj
Sarfarj Ahmed
|
|
|
|
|
|
Dear All,
Are you aware of any face tagging library that is available for .Net? My idea is to have the facility to implement face tagging such as hi5 and facebook do.
I believe that a library which gives the co-ordinates of the faces in an image will be sufficient. What are your ideas in this regard?
Many thanks
|
|
|
|
|
If such a library exists for free, I'd be astounded. I'd not be surprised to find a commercial library, tho.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi dear i have installed asp flash control and i drag and dropped in page, it will work in the system only when i hosted that is asking license. i installed free version of flash control. what can i do give me it briefly
thank u
somasekhar
somasekhar
|
|
|
|
|
You add flash with HTML, it's an object tag, from memory. You don't need any control.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
just add this in the design, just corect it a litle.. the file name with yours or with url to yours..
<object classid="clsid:D697CDE7E-AE6D-11cf-96B8-458453540000"
codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0"
id="animation name" width="468" height="60">
<param name="movie" value="animationname.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#FFFFFF">
<embed name="animationname" src="animationname.swf" quality="high" bgcolor="#FFFFFF"
width="468" height="60"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
</object>
|
|
|
|
|
Dear All,
I have been using ASP.NET for quite a while now and this questions has been in my mind for quite a long.
So let us assume that I have two classes LogAction and LogEntry. The class LogAction describes an action that is found in a log such as "Login", "Deleted a record" etc. The class LogEntry implements the actual entry that will be put in the log. This class has a LogAction as one of its entries.
So far so good. Now let us move to the data access layer. Suppose that I have a DAL class for both LogAction and LogEntry. In the DAL of LogAction I implement an Add method which calls a stored procedure which enters a new record in the appropriate table and also other methods such as Get methods.
Now if I want to add a LogEntry in the database I have to check whether the LogAction (which is one of its member) is already in the database. If it is not, I need to insert it.
The question I have is how to implement this logic. I know that for efficiency's sake, the best way would be to implement a separate stored procedure which does all these checks and entries in one connection.
But for the sake of OOP it would be better if the DAL of LogEntry consults with the DAL of LogAction to see if the LogAction is already present etc...
Which in your opinion is the best way to implement such logic. I know that this is a fundumental issue in enterprise application design.
Many thanks for your help!
Chris
|
|
|
|
|
Well, I wouldn't write a DAL for each class, I'd just write one dll. Then I'd write my proc to be as efficient as it can be. I don't NEED to create a LogAction in my C# code, I just need a return from the DB that tells me if one existed in the DB or not.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I'm using vb.net application form
My form requests user to enter ID in text area to retreive some data for printing
I want to know is it possible to pass this ID as a paramter when I call the web application form without requesting user to submit it I mean that I will send user link of the application form with the ID as a parameter just as we do in a web form.
|
|
|
|
|
From what I understood, you have a windows application where user will enter some id. You need to send that id to your webapplication. Right?
|
|
|
|
|
Naglaa Saeed wrote: just as we do in a web form.
I think this means you're in the wrong forum, b/c you're not asking about an ASP.NET app. In a windows form you pass parameters as properties or to a constructor.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi All.
I Deploy my web site on my pc in win2000 server.
I use urlrewritinig and have some link like "mysite/Home/br_2".
When I browse my site on iis this link give me "Page not found error".But when I run my project from visual studio from using open website it work ok.
What I should to do?
sepel
|
|
|
|
|
IIS6.0 will not support extension-less URL rewriting. When you run from VS, all requests are processed by ASP.NET engine and extension-less URLs will work. In IIS, this is not the case. IIS7.0 allows you to do extension-less URL rewriting though.
|
|
|
|
|
You can use Filemon to see what the page is actually looking for:
http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx[^]
You can filter the output for the particular worker process that your website is in. Good luck!
Ranjit Viswakumar
Professional Services Specialist
http://hostmysite.com/?utm_source=bb
|
|
|
|
|
|
Hello,
VS2008-C#-linq
I'm trying to create a news system website. I have a table with 6 columns:
id-int | name -text | description -text | details - text | date - date | picture - image
I want it to look like this http://money.cnn.com/news/ - the first news on the site.
The picture in the right and in it's left: from up to bottom: name/date/description.
The description will be a hyperlink to a form where i will display the details.
I have managed to create an image object and fill it with the proper image. I don't know
how to do the rest: display everything in the order i want.
The code so far:
DataClasses1DataContext db = new DataClasses1DataContext();
var date = from c in db.test1s
select c;
foreach (test1 a in date)
{
Image Photo = new Image();
Photo.ImageUrl="Work.aspx?ID="+a.id;
}
where test1 is the table.
Can someone tell me how to do the rest?
|
|
|
|
|
radupopescu777 wrote: Can someone tell me how to do the rest?
That is too much for a forum post. You can use a repeater control to design the layout which you have specified. Repeater provides great control over the rendered HTML.
|
|
|
|
|
Hello,
does anybody of you know if there is the possibility (e. g. through third party plug ins) of enabling Visual Studio 2008 to use code snippets in .aspx files?
I know how to use them in vb.net files (and cs and xml) but VS doesn't seem to be able to do this in aspx files(ctrl-k,ctrl-c gives a negative response). All my searches have only led me to sites / tools (Snippet Designer etc) which covered only the other languages.
Is there a way? I haven't found one but maybe some member of this forum may know of a possibility?
Thanks in advance
|
|
|
|